I try to prevent the clickable image event on WooCommerce by adding the following code. It works fine but after adding it, in the single product page, it shows a text ("open" in this case) above the image. How can I solve this problem?
function e12_remove_product_image_link( $html, $post_id ) {
return preg_replace( "!<(a|/a).*?>!", '', $html );
}
add_filter( 'woocommerce_single_product_image_thumbnail_html', 'e12_remove_product_image_link', 10, 2 );