• Resolved KoolPal

    (@koolpal)


    Hi,

    I can see that wbulite.css & wbulite.js is loading on ALL Pages.

    How can this be restricted to Checkout page ONLY?

    Settings or code snippet for functions.php will also do.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author moiseh

    (@moiseh)

    Hi,
    Here’s the code snippet to avoid load on all pages. You can put in your theme functions.php file

    PS: The reason for this is that many users include woocommerce stuff in different pages.

    add_action('wp_print_scripts',function(){
        if ( !is_checkout() ) {
            wp_dequeue_script('wbulite');
            wp_dequeue_script('wbupro');
        }
    }, PHP_INT_MAX);
    Thread Starter KoolPal

    (@koolpal)

    Hi,

    Thanks.

    This code still shows wbulite.css on every page.

    How do I ensure it loads only on Checkout?

    Thanks

    Plugin Author moiseh

    (@moiseh)

    You can use in same way:
    wp_dequeue_style('wbulite');

    Regards

    • This reply was modified 5 years, 3 months ago by moiseh.
    Thread Starter KoolPal

    (@koolpal)

    @moiseh

    Thank you! Works perfectly!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Load wbulite.css & wbulite.js only on Checkout page’ is closed to new replies.