WooCommerce - Disable Image Zoom And Click
451 days agoThis snippet removes the zoom and click feature for your WooCommerce Product images. This snippet can be places in your functions.php or wp-content/mu-plugins folder.
<?php
add_action(
"after_setup_theme",
"hoog_woo_remove_image_effect_support",
100
);
public function hoog_woo_remove_image_effect_support()
{
remove_theme_support("wc-product-gallery-zoom");
remove_theme_support("wc-product-gallery-lightbox");
}
add_filter(
"woocommerce_single_product_image_thumbnail_html",
"hoog_woo_remove_product_image_link",
10,
2
);
public function hoog_woo_remove_product_image_link($html, $post_id)
{
return preg_replace("!<(a|/a).*?>!", "", $html);
}
