diff --git a/woocommerce/single-product/product-thumbnails.php b/woocommerce/single-product/product-thumbnails.php
index 4d944a3..ace91d0 100644
--- a/woocommerce/single-product/product-thumbnails.php
+++ b/woocommerce/single-product/product-thumbnails.php
@@ -1,7 +1,7 @@
get_gallery_attachment_ids();
+$attachment_ids = $product->get_gallery_image_ids();
-if ( $attachment_ids ) {
- $loop = 0;
- $columns = apply_filters( 'woocommerce_product_thumbnails_columns', 3 );
- ?>
-
$image_title,
+ 'data-src' => $full_size_image[0],
+ 'data-large_image' => $full_size_image[0],
+ 'data-large_image_width' => $full_size_image[1],
+ 'data-large_image_height' => $full_size_image[2],
+ );
- $classes = array( 'zoom' );
+ $html = '
';
- if ( $loop === 0 || $loop % $columns === 0 ) {
- $classes[] = 'first';
- }
-
- if ( ( $loop + 1 ) % $columns === 0 ) {
- $classes[] = 'last';
- }
-
- $image_class = implode( ' ', $classes );
- $props = wc_get_product_attachment_props( $attachment_id, $post );
-
- if ( ! $props['url'] ) {
- continue;
- }
-
- echo apply_filters(
- 'woocommerce_single_product_image_thumbnail_html',
- sprintf(
- '
%s',
- esc_url( $props['url'] ),
- esc_attr( $image_class ),
- esc_attr( $props['caption'] ),
- wp_get_attachment_image( $attachment_id, apply_filters( 'single_product_small_thumbnail_size', 'shop_thumbnail' ), 0, $props )
- ),
- $attachment_id,
- $post->ID,
- esc_attr( $image_class )
- );
-
- $loop++;
- }
-
- ?>
-