diff --git a/includes/class-wc-regenerate-images.php b/includes/class-wc-regenerate-images.php index 2ef3214c731..862a20f8934 100644 --- a/includes/class-wc-regenerate-images.php +++ b/includes/class-wc-regenerate-images.php @@ -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(); + } } /**