get_gallery_attachment_ids() ); $gallery = $attachment_count > 0 ? '[product-gallery]' : ''; $props = wc_get_product_attachment_props( get_post_thumbnail_id(), $post ); $image = get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array( 'title' => $props['title'], 'alt' => $props['alt'], ) ); echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '%s', esc_url( $props['url'] ), esc_attr( $props['caption'] ), $gallery, $image ), $post->ID ); } else { echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '%s', wc_placeholder_img_src(), __( 'Placeholder', 'woocommerce' ) ), $post->ID ); } do_action( 'woocommerce_product_thumbnails' ); ?>