ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array(
'title' => $image_title
) );
$attachment_count = count( $product->get_gallery_image_ids() );
if ( $attachment_count > 0 ) {
$gallery = '[product-gallery]';
} else {
$gallery = '';
}
echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '
%s
', $image ), $post->ID );
// additional
$attachment_ids = $product->get_gallery_image_ids();
if ( $attachment_ids ) {
$loop = 0;
$columns = apply_filters( 'woocommerce_product_thumbnails_columns', 3 );
foreach ( $attachment_ids as $attachment_id ) {
$image_title = esc_attr( get_the_title( $attachment_id ) );
$image = wp_get_attachment_image( $attachment_id, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array('title' => $image_title,'alt' => $image_title) );
echo apply_filters( 'woocommerce_single_product_image_html',sprintf( '
%s
', $image ), $attachment_id);
}
}
} else {
echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '
', wc_placeholder_img_src(), __( 'Placeholder', 'woocommerce' ) ), $post->ID );
}
?>