get_image_id();
$wrapper_classes = apply_filters(
'woocommerce_single_product_image_gallery_classes',
array(
'woocommerce-product-gallery',
'woocommerce-product-gallery--' . ($post_thumbnail_id ? 'with-images' : 'without-images'),
'woocommerce-product-gallery--columns-' . absint($columns),
'images',
)
);
$attachment_ids = $product->get_gallery_image_ids();
array_unshift($attachment_ids, $post_thumbnail_id);
?>
get_image_id()) {
$html = '';
foreach ($attachment_ids as $attachment_id) {
$gallery_thumbnail = wc_get_image_size('gallery_thumbnail');
$thumbnail_size = apply_filters('woocommerce_gallery_thumbnail_size', array($gallery_thumbnail['width'], $gallery_thumbnail['height']));
$full_size = apply_filters('woocommerce_gallery_full_size', apply_filters('woocommerce_product_thumbnails_large_size', 'full'));
$thumbnail_src = wp_get_attachment_image_src($attachment_id, $thumbnail_size);
$full_src = wp_get_attachment_image_src($attachment_id, $full_size);
$alt_text = trim(wp_strip_all_tags(get_post_meta($attachment_id, '_wp_attachment_image_alt', true)));
$html .= ' -
';
// echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', wc_get_gallery_image_html( $attachment_id ), $attachment_id ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
}
$html .= '
';
}
} else {
$html = '';
$html .= sprintf('

', esc_url(wc_placeholder_img_src('woocommerce_single')), esc_html__('Awaiting product image', 'woocommerce'));
$html .= '
';
}
echo apply_filters('woocommerce_single_product_image_thumbnail_html', $html, $post_thumbnail_id); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
do_action('woocommerce_product_thumbnails');
?>