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

Discussion in 'Webmastering & Programming' started by Tengis, Aug 9, 2017.

  1. Tengis

    Tengis [H]ardness Supreme

    Messages:
    4,612
    Joined:
    Jun 11, 2003
    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
     

    Attached Files:

  2. Tengis

    Tengis [H]ardness Supreme

    Messages:
    4,612
    Joined:
    Jun 11, 2003
    I currently have a handful of things disabled to optimize CSS and caching until I fix this problem, FYI.
     
  3. discobiscuits

    discobiscuits Limp Gawd

    Messages:
    302
    Joined:
    Feb 21, 2007
    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/
     
  4. Tengis

    Tengis [H]ardness Supreme

    Messages:
    4,612
    Joined:
    Jun 11, 2003
    I ended up figuring it out. For some reason the wrong thumbnail was being called upon in functions.php.