Add single_product_archive_thumbnail_size filter

Add in a filter to allow for custom image sizes w/o needing to override the whole function.
This commit is contained in:
Caleb Burks 2016-05-21 10:29:44 -05:00
parent fc2e611d1e
commit 72a2c25536
1 changed files with 1 additions and 0 deletions

View File

@ -728,6 +728,7 @@ if ( ! function_exists( 'woocommerce_get_product_thumbnail' ) ) {
*/
function woocommerce_get_product_thumbnail( $size = 'shop_catalog', $deprecated1 = 0, $deprecated2 = 0 ) {
global $post;
$size = apply_filters( 'single_product_archive_thumbnail_size', 'shop_catalog' );
if ( has_post_thumbnail() ) {
$props = wc_get_product_attachment_props( get_post_thumbnail_id(), $post );