If you want to disable WooCommerce cart fragments using a plugin, I recommend the Disable Cart Fragments by Optimocha plugin.
It’s very simple to use — just install and activate it, and you’re done. No complicated setup or coding required. Perfect if you want a quick and hassle-free solution.
Or, if you prefer using code, here’s a simple option for you.
Just copy the code and paste it into your active theme’s functions.php file, then save the changes. That’s it — no extra steps needed.
You can find the code below.
add_action( 'wp_enqueue_scripts', 'rajankarmaker_disable_cart_fragments', 30 );
function rajankarmaker_disable_cart_fragments() {
wp_dequeue_script( 'wc-cart-fragments' );
}
It’s also possible to run your own code whenever the cart fragments update by using a jQuery event. See this article.



