Disable Product Image Zoom

Disable Product Image Zoom in Woocommerce

Woocommerce 3+ have built in image zoom feature, When you hover a product image on the single product page, you can zoom on the products images; Most of us love this feature, however, some people would like to remove it.

For Number of reasons such as You are selling something which doesn’t need to use Zoom effect.

In order to disable product Image Zoom, simply paste this snippet into your functions.php file, within the theme folder:

remove_theme_support( 'wc-product-gallery-zoom' );

This one line magic code will disable image zoom feature on the single product page in WooCommerce.

Disable WooCommerce Lightbox

Lightbox is a feature which let you click on any images and open the image gallery in WooCommerce. This is a great feature if you are selling something where the user needs to see images closely.

And if you don’t like this feature in general or simply want to disable for any other reason add the following code in theme’s functions.php file

remove_theme_support( 'wc-product-gallery-lightbox' );

As always I must remind everyone, Please only use the child theme for all customization. Otherwise, You will lose all the changes after theme update. Or use code snippets plugin

If having any issue with the above snippet let us know in the comments below.

Leave a Reply