Created
March 13, 2018 14:17
-
-
Save jamesckemp/c6567ec54aff4dff0bf86e0bb482f46f to your computer and use it in GitHub Desktop.
WooCommerce crop single image
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 | |
/** | |
* Modify shop single sizes. | |
* | |
* @param array $size | |
* | |
* @return array | |
*/ | |
function iconic_modifiy_shop_single( $size ) { | |
return array( | |
'width' => 600, | |
'height' => 600, | |
'crop' => 1, | |
); | |
} | |
add_filter( 'woocommerce_get_image_size_single', 'iconic_modifiy_shop_single', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment