Created
June 11, 2022 23:02
-
-
Save daddiofaddio/64b8245a81c26c32dd14f8f1461ff7ec to your computer and use it in GitHub Desktop.
Woocommerce remove & replace Select2 styles with Bootstrap5
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
/* WOO REMOVE & REPLACE SELECT2 STYLES TO BS */ | |
add_action('wp_enqueue_scripts', 'agentwp_dequeue_stylesandscripts', 100); | |
function agentwp_dequeue_stylesandscripts() { | |
if (class_exists('woocommerce')) { | |
wp_dequeue_style('selectWoo'); | |
wp_deregister_style('selectWoo'); | |
wp_dequeue_style('select2'); | |
wp_deregister_style('select2'); | |
wp_dequeue_script('selectWoo'); | |
wp_deregister_script('selectWoo'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment