B
B
BIGO232019-09-20 10:47:24
WordPress
BIGO23, 2019-09-20 10:47:24

Disable select2 for module?

Hello, how to disable select2 for the woocomerce module Filtering products by attributes found such a code, but it disables it throughout the site

add_action( 'wp_enqueue_scripts', 'wsis_dequeue_stylesandscripts_select2', 100 );

function wsis_dequeue_stylesandscripts_select2() {
    if ( class_exists( 'woocommerce' ) ) {
        wp_dequeue_style( 'selectWoo' );
        wp_deregister_style( 'selectWoo' );

        wp_dequeue_script( 'selectWoo');
        wp_deregister_script('selectWoo');
    } 
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question