• I want exclude some script from woocommerce. which making issue with my site. I see this “data-phast-no-defer” add into the script but i don’t want to add this to woocommerce plugin core files. is there any way?

    Another thing I also try to exlude cart and checkout by this
    add_filter(‘phastpress_disable’, function ($disable) {
    return $disable || is_cart() || is_checkout();
    });

    but not working. after add this on my function.php i can see cart and checkout still optimize by phastpress.

Viewing 1 replies (of 1 total)
  • Plugin Author Albert Peschar

    (@kiboit)

    Hey Rokeybur,

    You’re right that the phastpress_disable hook doesn’t work as I described. That’s because in the current version of PhastPress, the hook is triggered too early in the WordPress startup process, when functions.php has not been loaded yet, and is_cart/is_checkout don’t work either.

    I’ve just released PhastPress 1.37 to correct that problem. After you update to this version, you should be able to use the hook as intended.

    I see this “data-phast-no-defer” add into the script but i don’t want to add this to woocommerce plugin core files. is there any way?

    Unfortunately not, for now. But chances are that it won’t work anyway, because scripts frequently depend on each other.

    Would you be willing to share the URL of your site and describe the exact issue you’re seeing? Perhaps there’s a simpler solution…

    –Albert

Viewing 1 replies (of 1 total)
  • The topic ‘How can I exlude some script?’ is closed to new replies.