Created
August 6, 2019 08:40
-
-
Save madeincosmos/fe24b6947974db147bd7e45d97b9bddb to your computer and use it in GitHub Desktop.
Scale WooCommerce gallery thumbnails to 180x180 px
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function woo_custom_single_image_size ( $size ) { | |
$size['height'] = 180; | |
$size['width'] = 180; | |
$size['crop'] = 1; | |
return $size; | |
} | |
add_filter('woocommerce_get_image_size_gallery_thumbnail', 'woo_custom_single_image_size', 50, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment