Sandesh

April 21, 2020

WooCommerce: Disable Zoom, Lightbox and Product Gallery Slider @ Single Product Page

WooCommerce has exciting features like image zoom effect. Lightbox and product images gallery. But, it may not be needed for everyone. If you want to disable Zoom, Lightbox, and Product gallery slider, then this code snippet will work for you.

Names in the code are self-explanatory about the function.

PHP code snippet :

/**
 * @snippet       WooCommerce: Disable Zoom, Lightbox and Product Gallery Slider @ Single Product Page
 * @author        Sandesh Jangam
 * @donate $7     https://www.paypal.me/SandeshJangam/7
 */
 
add_action( 'wp', 'ts_remove_zoom_lightbox_gallery_support', 99 );
  
function ts_remove_zoom_lightbox_gallery_support() { 
   remove_theme_support( 'wc-product-gallery-zoom' );
   remove_theme_support( 'wc-product-gallery-lightbox' );
   remove_theme_support( 'wc-product-gallery-slider' );
}

Where to add custom PHP code?

Add the above PHP code at the end of to your child theme’s functions.php. There are many ways to add custom PHP code ( custom functionality ) to WordPress / WooCommerce website. Read this article for more information

Why this code is not working?

If you face any issue with the above code, then please let me know in the comment. I will be happy to review the code, and If it is working for you, then show me some love in the comment section.

Thank you in advance…!

Sharing is Caring!
Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on telegram
Share on whatsapp

About the Author

Sandesh Jangam is Developer, WooCommerce Expert, and Podcaster. He is working as a WordPress developer since 2014 and helping people with this blog. He loves to travel ancient temples, chilling at the beach and reading books

Join 1,000+ Subscribers

Get exclusive access to WordPress, WooCommerce tips, articles, tutorials right in your inbox.​

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on telegram
Share on whatsapp

Leave a Comment

Your email address will not be published. Required fields are marked *

Become a WooCommerce Customization Expert and Earn More​

Get an early access notification right in your inbox.

Learn More or Register Now >>>