Prevent timeouts with option + reduce number of thumbnails generated by script

This commit is contained in:
Mike Jolley 2018-01-25 15:04:55 +00:00
parent c7ccc93a69
commit a4b6110990
1 changed files with 3 additions and 1 deletions

View File

@ -172,7 +172,9 @@ class WC_Regenerate_Images {
* Check if we should generate images when new themes declares custom sizes.
*/
public static function maybe_regenerate_image_theme_switch() {
self::queue_image_regeneration();
if ( wc_get_theme_support( 'single_image_width' ) || wc_get_theme_support( 'thumbnail_image_width' ) ) {
self::queue_image_regeneration();
}
}
/**