Skip to content

Instantly share code, notes, and snippets.

@amsgator
Created April 5, 2019 22:42
Show Gist options
  • Save amsgator/18043818d811ed08b19c4d75c5f0a9a3 to your computer and use it in GitHub Desktop.
Save amsgator/18043818d811ed08b19c4d75c5f0a9a3 to your computer and use it in GitHub Desktop.
Remove Select2 / SelectWoo from WooCommerce
<?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