Anyone intimately familiar with Woocommerce that can help find an issue?

Tengis

Supreme [H]ardness
Joined
Jun 11, 2003
Messages
6,090
I have a problem that cropped up in the last week with no changes on my part. Basically, category images for my products aren't displayed as the hard cropped version, instead its defaulting to versions that are simply resized (and not forced to 300x300).

I have messed around with regenerating images for two days and cant figure out what is causing it. Im not a PHP guru by any means, but I've looked through the various Woocommerce PHP files and the ones included with my theme to see if I can find an issue where it is calling upon the wrong image.

The image being called upon is "medium", which is NOT a hard cropped 300x300. The image that IS hard cropped to 300x300 is apparently "medium_large".

Page can be viewed here: https://roninimports.com/product-category/jdm-imported-parts
 

Attachments

  • Capture.PNG
    Capture.PNG
    63 KB · Views: 29
I currently have a handful of things disabled to optimize CSS and caching until I fix this problem, FYI.
 
I'd recommend posting this to Stackoverflow for a better response.

Are you using a plugin to modify which images are being used as thumbnails? You could easily dig into the PHP file controlling this (via a child theme, preferably) and modify the thumbnail hook to pull in the "medium_large" thumbnail instead of the "medium", but without source code or your setup available, it's impossible to diagnose. I think WooCommerce uses their own built-in templates to setup product archives, but your WP theme might be overriding them, as well.. again, all of this is pretty tough to diagnose without PHP sources to inspect.

edit: I just remembered WooCommerce uses a separate section to generate thumbnails. It looks like that screenshot was taken from (Settings -> Media) instead of (WooCommerce -> Settings -> Products -> Display)

Try accessing your WooCommerce display settings to alter your product images. Here's a link for reference -- https://theme-fusion.com/knowledgebase/how-to-fix-woocommerce-image-size-issues/
 
I ended up figuring it out. For some reason the wrong thumbnail was being called upon in functions.php.
 
Im having another issue... for some reason if you put "roninimports.com" without the https then then redirect makes the page load take around 10 to 11 seconds. I've tinkered for a few hours and have no idea what is causing it. It just started doing this recently.
 
Back
Top