Disable Cart Fragments by Optimocha


Disable Cart Fragments is a lightweight plugin which effectively speeds up your WooCommerce website by disabling the cart fragments script. It also enqueues the script back when the cart is not empty anymore; so it only works while the cart is empty.

Why is disabling cart fragments important?

WooCommerce makes an AJAX request to check your cart and update your cart totals in wherever your theme shows cart contents (like the header menu). This AJAX call is made to override caching plugins, which is good, but it generally takes time.

How does Disable Cart Fragments solve the issue?

With our plugin, you have the best of both worlds: You keep using the caching plugin and you still get to update the cart totals when the cart is not empty. This check is made via WooCommerce cart cookies, so it still employs JavaScript but doesn’t rely on slow AJAX requests. The check is made instantly, whether you’re using a caching plugin or not. How cool is that?

WooCommerce Optimization Services

Feel free to reach out to us at Optimocha.com and let us help you optimize your WooCommerce website!

Main plugin features

  • Disables WooCommerce cart fragments.
  • Checks the cart cookies and if it’s not empty, loads the cart fragments script so the cart totals are still updated.
  • Brings you joy. (WARNING: Might not bring joy in some rare cases.)


  1. Download the plugin (.zip file) on your hard drive.
  2. Unzip the zip file contents.
  3. Upload the disable-cart-fragments folder to the /wp-content/plugins/ directory.
  4. Activate the plugin through the ‘Plugins’ menu in WordPress.
  5. When activated, it will start working. There’s no settings page, simply activate and use.


May 22, 2020
Perfecto uno de los mejores no saben cuanto tiempo ahorra en carga, y además funciona en mi sitio web con Wocommerce. Ty so much for your time creating this plugins. I love 5 Stars.
May 1, 2020
'wc-ajax=get_refreshed_fragments' had been on our radar for sometime, so we were very pleased to find 'Disable Cart Fragments by Optimocha' and to read its modus operandi. Not sure about @technisolutions comment regarding older versions of WooCommerce. We're running Woo 4.0.1 and it works for us. 'wc-ajax=get_refreshed_fragments' is no longer in the Waterfall of GTmetrix for our homepage. Thank you.
January 18, 2020
My business is hosted on a shared server, set up includes cache plugin, Woocommerce and other plugins. Before installing this plugin, my landing page loaded around 5-7 seconds. After installing this, it shaved it down to ~4 seconds. THANK YOU SO MUCH. Hope you keep this plugin updated! <3
October 29, 2019
Works as expected, lets you get rid off slow cart fragments ajax requests for all the visitors without items in cart.
Read all 7 reviews

Contributors & Developers

“Disable Cart Fragments by Optimocha” is open source software. The following people have contributed to this plugin.




  • Forgot to change the version name in the PHP file… (sigh)


  • Tested with WooCommerce v4.0.1.
  • Changed dependancy of the cart fragments script from woommerce(.min).js to jquery.js.


  • Edited readme.txt to fix the info on the “Installation” section.
  • Branded the plugin with a nice little icon.


  • Initial release