Add this fix to functions.php:
if ( ! function_exists( 'fix_single_product_image_sizes') ) {
function fix_single_product_image_sizes() {
$sizes = wc_get_image_size( 'woocommerce_single' );
if ( ! $sizes['height'] ) {
$sizes['height'] = $sizes['width'];
}
return array( $sizes['width'], $sizes['height'] );
}
add_filter( 'woocommerce_gallery_thumbnail_size', 'fix_single_product_image_sizes' );
}
Add this fix to functions.php:
if ( ! function_exists( 'fix_single_product_image_sizes') ) {
function fix_single_product_image_sizes() {
$sizes = wc_get_image_size( 'woocommerce_single' );
if ( ! $sizes['height'] ) {
$sizes['height'] = $sizes['width'];
}
return array( $sizes['width'], $sizes['height'] );
}
add_filter( 'woocommerce_gallery_thumbnail_size', 'fix_single_product_image_sizes' );
}
-
This reply was modified 6 years, 6 months ago by jehad.dev.