• Resolved harmputman

    (@harmputman)


    I’m trying to dequeue/deregister the css that is loaded when using the plugin so i can use my own css. But somehow it’s not working. The code I’m using is:

    function remove_woof_css() {
        wp_dequeue_style( 'chosen-drop-down' );
        wp_dequeue_style( 'icheck-jquery-color' );
        wp_dequeue_style( 'woof' );
    }
    add_action( 'wp_print_styles', 'remove_woof_css', 101 );

    Any clues?

    https://wordpress.org/plugins/woocommerce-products-filter/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author RealMag777

    (@realmag777)

    Hello.
    You do right, except ‘woof’, use ‘woof_front’
    I am doing this by hook
    add_action(‘wp_head’, array($this, ‘wp_head’), 999); in index.php
    so maybe you do remove_woof_css before my hook

    If you have no ability to do it after just edit code by hands in index.php
    or
    try add hook
    add_action(‘wp_head’, array($this, ‘wp_head’), 1001);

    and de-enqueue styles there

    Thread Starter harmputman

    (@harmputman)

    ‘woof_front’ didn’t work, because this is not a registered handler.
    I got it working by using my original script, but adding the action on ‘wp_head’ instead of ‘wp_print_styles’ hook and setting a higher priority value.

    function remove_woof_css() {
        wp_dequeue_style( 'chosen-drop-down' );
        wp_dequeue_style( 'icheck-jquery-color' );
        wp_dequeue_style( 'woof' );
    }
    add_action( 'wp_head', 'remove_woof_css', 9999 );

    Thanks for the tips!

    Plugin Author RealMag777

    (@realmag777)

    Welcome …

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Dequeue style not working’ is closed to new replies.