MainWP Community

Remove links from single product image thumbnails in WooCommerce

Remove links from single product image thumbnails in WooCommerce on your child site.

Snippet Type

Execute on Child Sites

Snippet

add_filter('woocommerce_single_product_image_thumbnail_html','wc_remove_link_on_thumbnails' );
 
function wc_remove_link_on_thumbnails( $html ) {
     return strip_tags( $html,'<div><img>' );
}
1 Like