I would like to show only the first image of product on the single product page (The featured one and the same small one). In other words, hide all images but not the featured image.
I know that I have to use woocommerce_single_product_image_thumbnail_html (or maybe not), I have tested:
function remove_featured_image($html, $attachment_id ) {
global $post, $product;
$featured_image = get_post_thumbnail_id( $post->ID );
if ( $attachment_id == $featured_image )
$html = '';
return $html;
}
add_filter('woocommerce_single_product_image_thumbnail_html', 'remove_featured_image', 10, 2);
But it delete all images...
Thanks for your help!
