Created
February 5, 2014 14:10
-
-
Save goliver79/8824314 to your computer and use it in GitHub Desktop.
[WOOCOMMERCE] Get thumbnail without resize
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
| <?php | |
| /* | |
| * @goliver: overwrite function for get thumbnail without resize | |
| * original in woocommerce-template.php | |
| */ | |
| function woocommerce_get_product_thumbnail( $size = 'shop_catalog', $placeholder_width = 0, $placeholder_height = 0 ) { | |
| global $post; | |
| if ( has_post_thumbnail() ) | |
| return get_the_post_thumbnail( $post->ID ); | |
| elseif ( woocommerce_placeholder_img_src() ) | |
| return woocommerce_placeholder_img( $size ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment