Product Gallery on single product pages in WordPress include the product’s featured image by default. If you are looking to exclude it so only the gallery images are shown, add the following in child theme‘s functions.php
or a code snippets plugin:
add_filter( 'woocommerce_single_product_image_thumbnail_html', function ( $html, $post_thumbnail_id ) {
global $product;
if ( $post_thumbnail_id === $product->get_image_id() )
$html = '';
return $html;
}, 10, 2 );
Reference
/wp-content/themes/bricks/includes/woocommerce/elements/product-gallery.php
1 comment
Jacqui
Hi, thanks, this does indeed remove the featured image. However, on a variable product, the main gallery image no longer swaps out when selections are made. The thumbnail below the main image still does though.