diff --git a/includes/wc-template-functions.php b/includes/wc-template-functions.php index 51e05245fec..a3444283033 100644 --- a/includes/wc-template-functions.php +++ b/includes/wc-template-functions.php @@ -1053,6 +1053,8 @@ if ( ! function_exists( 'woocommerce_show_product_thumbnails' ) ) { /** * Get HTML for a gallery image. * + * woocommerce_gallery_thumbnail_size, woocommerce_gallery_image_size and woocommerce_gallery_full_size accept name based image sizes, or an array of width/height values. + * * @since 3.3.2 * @param int $attachment_id * @param bool $main_image Is this the main image or a thumbnail? diff --git a/templates/single-product/product-image.php b/templates/single-product/product-image.php index ab3217b345e..f410108fc8b 100644 --- a/templates/single-product/product-image.php +++ b/templates/single-product/product-image.php @@ -18,6 +18,11 @@ defined( 'ABSPATH' ) || exit; +// Note: `wc_get_gallery_image_html` was added in WC 3.3.2 and did not exist prior. This check protects against theme overrides being used on older versions of WC. +if ( ! function_exists( 'wc_get_gallery_image_html' ) ) { + return; +} + global $product; $columns = apply_filters( 'woocommerce_product_thumbnails_columns', 4 ); @@ -33,7 +38,6 @@ $wrapper_classes = apply_filters( 'woocommerce_single_product_image_gallery_cl