Skip to content

Instantly share code, notes, and snippets.

@goliver79
Created February 5, 2014 14:10
Show Gist options
  • Select an option

  • Save goliver79/8824314 to your computer and use it in GitHub Desktop.

Select an option

Save goliver79/8824314 to your computer and use it in GitHub Desktop.
[WOOCOMMERCE] Get thumbnail without resize
<?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