Skip to content

Instantly share code, notes, and snippets.

@corsonr
Last active June 20, 2018 07:17
Show Gist options
  • Save corsonr/332ed789d2db55a96028e89dfefd59df to your computer and use it in GitHub Desktop.
Save corsonr/332ed789d2db55a96028e89dfefd59df to your computer and use it in GitHub Desktop.
Disable WooCommerce 3.+ lightbox
<?php // Do not include this if already open! Code goes in theme functions.php.
add_action( 'after_setup_theme', 'remove_wc_gallery_lightbox', 100 );
function remove_wc_gallery_lightbox() {
remove_theme_support( 'wc-product-gallery-lightbox' );
}
@xlarin
Copy link

xlarin commented Jun 20, 2018

Add only:

add_action( 'after_setup_theme', 'remove_wc_gallery_lightbox', 100 );
function remove_wc_gallery_lightbox() {
remove_theme_support( 'wc-product-gallery-lightbox' );
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment