Fix image regeneration check when image is not cropped

Resolves #21800.
This commit is contained in:
Silicon Forks 2019-03-16 12:39:40 -03:00
parent 741bd5ba6d
commit 19a7bb82a0
1 changed files with 1 additions and 1 deletions

View File

@ -215,7 +215,7 @@ class WC_Regenerate_Images {
$uncropped = '' === $target_size['width'] || '' === $target_size['height'];
// If '' is passed to either size, we test ratios against the original file. It's uncropped.
if ( $uncropped ) {
if ( $uncropped || ! $target_size['crop'] ) {
$full_size = self::get_full_size_image_dimensions( $attachment_id );
if ( ! $full_size || ! $full_size['width'] || ! $full_size['height'] ) {