Created
April 5, 2019 22:42
-
-
Save amsgator/18043818d811ed08b19c4d75c5f0a9a3 to your computer and use it in GitHub Desktop.
Remove Select2 / SelectWoo from WooCommerce
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 | |
function dequeue_select2() { | |
if ( class_exists( 'woocommerce' ) ) { | |
// Styles | |
wp_dequeue_style( 'select2' ); | |
wp_deregister_style( 'select2' ); | |
// Scripts | |
wp_dequeue_script( 'selectWoo' ); | |
wp_deregister_script( 'selectWoo' ); | |
} | |
} | |
add_action( 'wp_enqueue_scripts', 'dequeue_select2', 100 ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment