diff --git a/includes/wc-template-functions.php b/includes/wc-template-functions.php index ce77d2e19d0..367c6dbb3fe 100644 --- a/includes/wc-template-functions.php +++ b/includes/wc-template-functions.php @@ -1481,8 +1481,7 @@ if ( ! function_exists( 'woocommerce_show_product_images' ) ) { $post_thumbnail_id = array_shift( $gallery_image_ids ); } } - $args = compact( 'post_thumbnail_id', 'gallery_image_ids' ); - wc_get_template( 'single-product/product-image.php', $args ); + wc_get_template( 'single-product/product-thumbnails.php', array( 'post_thumbnail_id' => $post_thumbnail_id ) ); } } if ( ! function_exists( 'woocommerce_show_product_thumbnails' ) ) { @@ -1495,7 +1494,7 @@ if ( ! function_exists( 'woocommerce_show_product_thumbnails' ) ) { $attachment_ids = $product->get_gallery_image_ids(); if ( $attachment_ids && ! $product->get_image_id() ) { - array_shift( $attachment_ids ); + array_shift( $attachment_ids ); } wc_get_template( 'single-product/product-thumbnails.php', array( 'attachment_ids' => $attachment_ids ) ); } diff --git a/templates/single-product/product-image.php b/templates/single-product/product-image.php index 02449c348f3..26407bc902b 100644 --- a/templates/single-product/product-image.php +++ b/templates/single-product/product-image.php @@ -12,7 +12,7 @@ * * @see https://docs.woocommerce.com/document/template-structure/ * @package WooCommerce\Templates - * @version 4.5.0 + * @version 4.6.0 */ defined( 'ABSPATH' ) || exit; diff --git a/templates/single-product/product-thumbnails.php b/templates/single-product/product-thumbnails.php index 3f083346e80..2bebd8a4e5a 100644 --- a/templates/single-product/product-thumbnails.php +++ b/templates/single-product/product-thumbnails.php @@ -12,7 +12,7 @@ * * @see https://docs.woocommerce.com/document/template-structure/ * @package WooCommerce\Templates - * @version 4.5.0 + * @version 4.6.0 */ defined( 'ABSPATH' ) || exit;