function e12_remove_product_image_link( $html, $post_id ) { return preg_replace( "!!", '', $html ); } add_filter( 'woocommerce_single_product_image_thumbnail_html', 'e12_remove_product_image_link', 10, 2 );