Update class-wc-regenerate-images.php

Fix coding styles and naming error
This commit is contained in:
yaroslawww 2019-02-28 16:48:18 +02:00 committed by GitHub
parent bb8bf5f749
commit 5f9225a1cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -219,8 +219,8 @@ class WC_Regenerate_Images {
$imagedata['width'] = $imagedata['sizes']['full']['width'];
}
if ( $image_size['width'] && $image_size['height'] ) {
$ratio_match = wp_image_matches_ratio($image[1], $image[2], $imagedata['width'], $imagedata['height']);
if ( $imagedata['width'] && $imagedata['height'] ) {
$ratio_match = wp_image_matches_ratio( $image[1], $image[2], $imagedata['width'], $imagedata['height'] );
}
} else {
$ratio_match = wp_image_matches_ratio( $image[1], $image[2], $image_size['width'], $image_size['height'] );