Home » WooCommerce: Disable Zoom, Slider & Lightbox @ Single Product

WooCommerce: Disable Zoom, Slider & Lightbox @ Single Product

by Tutor Aspire

Sometimes, cool things don’t apply to certain businesses. Also, keeping the default WooCommerce behaviour might slow down your website, should you not need to use a specific functionality.

For example, I’m talking about the new “Featured Image Zoom”, introduced by WooCommerce a while ago. What if your customers don’t need this? How can you disable it?

Well, as usual, this can be done with a few PHP lines! Now go and disable all the stuff you don’t need 🙂

Disable zoom, gallery and lightbox @ WooCommerce Single Product Page

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

 * @snippet       Remove Zoom, Gallery @ Single Product Page
 * @how-to        Get tutoraspire.com FREE
 * @author        Tutor Aspire
 * @testedwith    WooCommerce 5
 * @donate $9     https://www.tutoraspire.com
add_action( 'wp', 'tutoraspire_remove_zoom_lightbox_theme_support', 99 );
function tutoraspire_remove_zoom_lightbox_theme_support() { 
    remove_theme_support( 'wc-product-gallery-zoom' );
    remove_theme_support( 'wc-product-gallery-lightbox' );
    remove_theme_support( 'wc-product-gallery-slider' );

You may also like