Created
May 29, 2019 13:22
-
-
Save wpscholar/cd3ab304e81950c3690af9c180093715 to your computer and use it in GitHub Desktop.
Disable image zoom in the WooCommerce Product Gallery.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Plugin Name: WooCommerce Product Gallery - Disable Zoom | |
* Plugin URI: https://gist.github.com/wpscholar/cd3ab304e81950c3690af9c180093715 | |
* Description: Disable image zoom in the WooCommerce Product Gallery. | |
* Version: 1.0 | |
* Author: Micah Wood | |
* Author URI: https://wpscholar.com | |
* License: GPL2 | |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
* | |
* @see https://businessbloomer.com/woocommerce-disable-zoom-gallery-slider-lightbox-single-product/ | |
*/ | |
add_action( 'after_setup_theme', function () { | |
remove_theme_support( 'wc-product-gallery-zoom' ); | |
}, 99 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment