diff --git a/includes/class-wc-regenerate-images.php b/includes/class-wc-regenerate-images.php index 2c8f2da66c1..741431e38e8 100644 --- a/includes/class-wc-regenerate-images.php +++ b/includes/class-wc-regenerate-images.php @@ -66,7 +66,7 @@ class WC_Regenerate_Images { $size_settings = wc_get_image_size( $size ); - if ( isset( $imagemeta['sizes'][ $size ] ) ) { + if ( isset( $imagemeta['sizes'], $imagemeta['sizes'][ $size ] ) ) { if ( $imagemeta['sizes'][ $size ]['width'] !== $size_settings['width'] || $imagemeta['sizes'][ $size ]['height'] !== $size_settings['height'] ) { $image = self::resize_and_return_image( $attachment_id, $image, $size, $icon ); }