Merge pull request #13575 from woocommerce/fix-13573

Only show thumbs if there is a main post thumbnail
This commit is contained in:
Claudio Sanches 2017-03-13 16:25:48 -03:00 committed by GitHub
commit ad1073c212
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ global $post, $product;
$attachment_ids = $product->get_gallery_image_ids();
if ( $attachment_ids ) {
if ( $attachment_ids && has_post_thumbnail() ) {
foreach ( $attachment_ids as $attachment_id ) {
$full_size_image = wp_get_attachment_image_src( $attachment_id, 'full' );
$thumbnail = wp_get_attachment_image_src( $attachment_id, 'shop_thumbnail' );