Last active
June 19, 2017 08:44
-
-
Save ahmedeshaan/5e7dee8dd40d01b83c3c55447d65625e to your computer and use it in GitHub Desktop.
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
function woocommerce_get_product_thumbnail( $size = 'shop_catalog', $deprecated1 = 0, $deprecated2 = 0 ) { | |
global $post; | |
$image_size = apply_filters( 'single_product_archive_thumbnail_size', $size ); | |
if ( has_post_thumbnail() ) { | |
$props = wc_get_product_attachment_props( get_post_thumbnail_id(), $post ); | |
return get_the_post_thumbnail( $post->ID, $image_size, array( | |
'title' => esc_attr(get_the_title()), | |
'alt' => esc_attr(get_the_title()), | |
) ); | |
} elseif ( wc_placeholder_img_src() ) { | |
return wc_placeholder_img( $image_size ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment