• I’ll preface this post by saying I’m currently sick, so if I’ve missed something obvious I apologize profusely ??

    I have a client site that has your standard cart icon in the ancillary nav which shows the number of products in the cart. However, the client has noticed some quirky behavior and asked me to ensure that the number on this item is always accurate since it previously was misreporting quantities if you repeated certain behaviors with adding/removing products in certain ways which I confirmed. This isn’t a major issue since the majority of the site utilizes full page loads, however ONE page in woocommerce – the cart itself – has AJAX “remove from cart” buttons. The problem for me is that the user experience is now such that items can be removed from the cart, and the “number of items in the cart” button will not accurately reflect the quantity in the cart anymore.

    I’m not interested in custom-coding another AJAX call to find the new cart quantity and update the value, I would prefer to make these “remove from cart” links non-AJAX’d so that the cart will do a proper page load, which will take care of the value for me. I’ve searched high and low, and possibly just missed the setting, but can anyone tell me a way to accomplish that? Thanks!

Viewing 1 replies (of 1 total)
  • //Disabling AJAX for Cart Page..
    function cart_script_disabled(){
    	wp_dequeue_script( 'wc-cart' );
    }
    add_action( 'wp_enqueue_scripts', 'cart_script_disabled' );
    • This reply was modified 8 years, 1 month ago by Faisal Alvi.
Viewing 1 replies (of 1 total)
  • The topic ‘How to Disable AJAX “remove from cart”’ is closed to new replies.