Skip to content

Commit

Permalink
maybe_resize_image fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Jan 31, 2018
1 parent da8fdc0 commit 79dba98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-wc-regenerate-images.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static function maybe_resize_image( $image, $attachment_id, $size, $icon
$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 );
}

Expand Down

0 comments on commit 79dba98

Please sign in to comment.