From e49527cf9d546985a4f9c6db284d9540de302efb Mon Sep 17 00:00:00 2001 From: Ron Rennick Date: Fri, 28 Aug 2020 11:34:32 -0300 Subject: [PATCH] apply changes from feedback --- includes/wc-template-functions.php | 5 ++--- templates/single-product/product-image.php | 2 +- templates/single-product/product-thumbnails.php | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) 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;