• hello, I am trying to disable the ajax cart but still display it in the header of your theme:

    
    /**
    * xxxxxx FUNCTION TO DISABLE cart fragment on all pages
    */
    add_action( 'wp_print_scripts', 'nuke_cart_fragments', 100 );
    function nuke_cart_fragments() {
        wp_dequeue_script( 'wc-cart-fragments' );
        return true;
    }
    

    Do you think that if I disable the ajax cart with this function (because it slows every single page of any woocommerce shop), I can still show the cart with your theme ?

    I mean that even if your theme displays the cart, it won’t be updated when someone clicks ADD TO CART, but people will still be able to click on the cart icon to reach the cart page ?

    And what is doing this code ?

    
    .site-header-cart .widget_shopping_cart {
      display: none !important;
    }
    

    It seems to hide the minicart in the header ?

    Thank you for your help.

    • This topic was modified 6 years, 3 months ago by briberyexpert.
  • The topic ‘Display theme Woocommerce cart icon but disable AJAX ?’ is closed to new replies.