Created
February 19, 2018 17:07
-
-
Save DanielSantoro/823ecca7f1591f31f0869e69ed94cbc1 to your computer and use it in GitHub Desktop.
Add Theme Support for Thumbnail Regeneration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Don't include this line | |
add_theme_support( 'woocommerce', array( | |
'thumbnail_image_width' => 150, | |
'single_image_width' => 322, | |
) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Daniel,
Thanks for all of your help yesterday with my issues.
The code snippet above did not stop the server spikes as a result of this error:
PHP Warning: Invalid argument supplied for foreach() in /nas/content/live/lysejewelry/wp-content/plugins/woocommerce/includes/abstracts/class-wc-background-process.php on line 101, referer: https://lysetremblayjewelry.ca/wp-admin/admin-ajax.php?action=wp_1_wc_regenerate_images&nonce=21b126e3af
This one did:
/* filter added to prevent automatic regeneration of thumbnail images and causing server hikes */ add_filter( 'woocommerce_background_image_regeneration', '__return_false' );
Cheers
Lyse