Created
July 29, 2016 14:24
-
-
Save robneu/4c3081b6c03828e675a50b0b99843ebb to your computer and use it in GitHub Desktop.
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 | |
add_action( 'wp_enqueue_scripts', 'prefix_disable_wp_featherlight_woocommerce', 10 ); | |
/** | |
* Remove all required scripts and styles on WooCommerce pages. | |
* | |
* @since 0.1.0 | |
* @access public | |
* @return void | |
*/ | |
function prefix_disable_wp_featherlight_woocommerce() { | |
if ( function_exists( 'is_woocommerce' ) && is_woocommerce() ) { | |
add_filter( 'wp_featherlight_load_css', '__return_false' ); | |
add_filter( 'wp_featherlight_load_js', '__return_false' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I know this is five years old, but this is helpful. Instead of disabling the filter hooks themselves, another thing to try is directly deregistering the handles: