Merge pull request #18716 from woocommerce/fix/missing-image-size-18690
Fix product image on-the-fly generation
This commit is contained in:
commit
0886e5eab7
|
@ -69,7 +69,7 @@ class WC_Regenerate_Images {
|
|||
$size_settings = wc_get_image_size( $size );
|
||||
|
||||
// If size differs from image meta, regen.
|
||||
if ( isset( $imagemeta['sizes'], $imagemeta['sizes'][ $size ] ) && ( $imagemeta['sizes'][ $size ]['width'] !== $size_settings['width'] || $imagemeta['sizes'][ $size ]['height'] !== $size_settings['height'] ) ) {
|
||||
if ( ! isset( $imagemeta['sizes'], $imagemeta['sizes'][ $size ] ) || $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 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue