Height must be int
This commit is contained in:
parent
9d898bbf6e
commit
7339511495
|
@ -744,13 +744,13 @@ function wc_get_image_size( $image_size ) {
|
|||
} elseif ( 'custom' === $cropping ) {
|
||||
$width = max( 1, get_option( 'woocommerce_thumbnail_cropping_custom_width', '4' ) );
|
||||
$height = max( 1, get_option( 'woocommerce_thumbnail_cropping_custom_height', '3' ) );
|
||||
$size['height'] = round( ( $size['width'] / $width ) * $height );
|
||||
$size['height'] = absint( round( ( $size['width'] / $width ) * $height ) );
|
||||
$size['crop'] = 1;
|
||||
} else {
|
||||
$cropping_split = explode( ':', $cropping );
|
||||
$width = max( 1, current( $cropping_split ) );
|
||||
$height = max( 1, end( $cropping_split ) );
|
||||
$size['height'] = round( ( $size['width'] / $width ) * $height );
|
||||
$size['height'] = absint( round( ( $size['width'] / $width ) * $height ) );
|
||||
$size['crop'] = 1;
|
||||
}
|
||||
$image_size = 'thumbnail';
|
||||
|
|
Loading…
Reference in New Issue