Revert isset check as it was previously

This commit is contained in:
Umesh Ghimire 2017-11-29 14:13:47 +05:45
parent c8fa977453
commit e128f774c4
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class WC_Regenerate_Images {
$size_settings = wc_get_image_size( $size );
if ( in_array( $size, array( 'woocommerce_thumbnail' ), true ) && isset( $imagemeta['sizes'] ) ) {
if ( in_array( $size, array( 'woocommerce_thumbnail' ), true ) && 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 );
}