Created
August 16, 2018 06:25
-
-
Save Nikschavan/278cfbe2f60f01f556383077d0dbda05 to your computer and use it in GitHub Desktop.
Change the thumbnail size of the WooCommerce product gallery
This file contains 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
<?php | |
/** | |
* Change the product gallery thumbnail size. | |
* | |
* @param Array $size | |
* @return Array | |
*/ | |
function your_prefix_modify_gallery_thumbnail_size( $size ) { | |
return array( | |
'width' => 100, | |
'height' => 100, | |
'crop' => 0, | |
); | |
} | |
add_filter( 'woocommerce_get_image_size_gallery_thumbnail', 'your_prefix_modify_gallery_thumbnail_size' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment