WooCommerce – Images not showing when out of stock items hidden

Hi, I’m having an issue on my test site here… http://www.sling-spot.co.uk.php56-30.ord1-1.websitetestlink.com/shop/ which uses WooCommerce.

If I select the ‘Hide out of stock items from the catalog’ option on the back end then I get what you’re currently seeing – a few pages of blank or almost blank pages in the shop. If I deselect that option then I see more shop pages and images on all of them.

This is happening regardless of theme (I’ve tried on twenty seventeen) and I’ve tried turning off plugins.

Any ideas?

  • Predrag Dubajic
    • Support

    Hey Jon,

    Hope you’re doing well today :slight_smile:

    I had a look at your site but unfortunately I was unable to pinpoint the cause of this on your site, the same setup on my site doesn’t cause this issue.

    Can you enable debug log in your wp-config.php by replacing define(‘WP_DEBUG’, false); with this code:

    // Enable WP_DEBUG mode
    define('WP_DEBUG', true);

    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);

    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', false);
    @ini_set( 'display_errors', 0 );

    Visit shop page with and without “Hide out of stock items from the catalog” option enabled and this should create debug.log file in your wp-content folder that could tell us what is going on.

    Can you please save it as .txt file and attach it here so we can check it out.

    Best regards,


  • Jon
    • The Incredible Code Injector

    I’ve had an email from the guys at WooCommerce – can I ask you to pause on this while I give them access? If you’ve got any ideas on why the debug files aren’t being created though that would be helpful.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.