Title: Disable Cart Fragments by Optimocha
Author: Optimocha
Published: <strong>May 30, 2019</strong>
Last modified: September 1, 2025

---

Search plugins

![](https://ps.w.org/disable-cart-fragments/assets/icon-256x256.png?rev=2098872)

# Disable Cart Fragments by Optimocha

 By [Optimocha](https://profiles.wordpress.org/optimocha/)

[Download](https://downloads.wordpress.org/plugin/disable-cart-fragments.2.4.1.zip)

 * [Details](https://wordpress.org/plugins/disable-cart-fragments/#description)
 * [Reviews](https://wordpress.org/plugins/disable-cart-fragments/#reviews)
 *  [Installation](https://wordpress.org/plugins/disable-cart-fragments/#installation)
 * [Development](https://wordpress.org/plugins/disable-cart-fragments/#developers)

 [Support](https://wordpress.org/support/plugin/disable-cart-fragments/)

## Description

**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](https://optimocha.com/?ref=disable-cart-fragments)
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.)

## Installation

 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.

## Reviews

![](https://secure.gravatar.com/avatar/446cd875ff27850120a8af38956d1357cfbfb60532d6db6ca057d094f804d1c8?
s=60&d=retro&r=g)

### 󠀁[Simple, useful](https://wordpress.org/support/topic/simple-useful-49/)󠁿

 [Kadim Gültekin](https://profiles.wordpress.org/arkenon/) January 19, 2024 1 reply

It worked for me, thanks.

![](https://secure.gravatar.com/avatar/a2908bfe803136591070c0d8718acb124f097cb35f162bc6b05071bf5c4dc2ed?
s=60&d=retro&r=g)

### 󠀁[[Fixed] Non-dismissible advertisement for Shop Manager role users](https://wordpress.org/support/topic/non-dismissible-advertisement-for-shop-manager-role-users/)󠁿

 [sprucelydesigned](https://profiles.wordpress.org/sprucelydesigned/) June 26, 2023
1 reply

Updated my review from 1 to 3 stars as author replied here and presumably allowed
the notice to be dismissed (I’ve replaced the plugin so I cannot verify). This plugin
advertises speed optimization services via an admin notification but unfortunately
it is dismissible for administrator level accounts but not for shop manager accounts.
Either an unfortunate bug or intentionally advertising to less privileged user accounts.
Either way, we replaced this plugin with one that doesn’t do this.

![](https://secure.gravatar.com/avatar/a8a2a9a47cf7de9857aba3d85cf869880192fece1d1d1a4fc8a8491b2d9f1b82?
s=60&d=retro&r=g)

### 󠀁[Great!](https://wordpress.org/support/topic/great-15506/)󠁿

 [royrogers](https://profiles.wordpress.org/royrogers/) April 21, 2023 1 reply

Fantastic and magical plugin. It should be merged as an option in the WooCommerce
settings itself

![](https://secure.gravatar.com/avatar/64c1470aec61b6a28626c7da908b55b68701af3a86457bae3fede275cbad1295?
s=60&d=retro&r=g)

### 󠀁[Awesome plugin!](https://wordpress.org/support/topic/awesome-plugin-6590/)󠁿

 [Robert](https://profiles.wordpress.org/roberthedlund/) September 19, 2022 2 replies

Probably the best free plugin for any WooCommerce site! Thank you so much 🙂

![](https://secure.gravatar.com/avatar/e202ae186d5c79680b97e147d49ce9be9d2403b162e90fc4be569c67900d3d3d?
s=60&d=retro&r=g)

### 󠀁[Genius! Thank you!](https://wordpress.org/support/topic/genius-thank-you/)󠁿

 [MBV](https://profiles.wordpress.org/mbv/) November 12, 2021

Awesome plugin, thank you!!!

![](https://secure.gravatar.com/avatar/6867772abc99cf18b782899885d18250ff911d500f3b8b35eaa5649afdee38f9?
s=60&d=retro&r=g)

### 󠀁[Amazing plugin](https://wordpress.org/support/topic/amazing-plugin-1922/)󠁿

 [oyantec](https://profiles.wordpress.org/oyantec/) July 9, 2021 1 reply

Thank you very much

 [ Read all 16 reviews ](https://wordpress.org/support/plugin/disable-cart-fragments/reviews/)

## Contributors & Developers

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

Contributors

 *   [ Optimocha ](https://profiles.wordpress.org/optimocha/)

“Disable Cart Fragments by Optimocha” has been translated into 7 locales. Thank 
you to [the translators](https://translate.wordpress.org/projects/wp-plugins/disable-cart-fragments/contributors)
for their contributions.

[Translate “Disable Cart Fragments by Optimocha” into your language.](https://translate.wordpress.org/projects/wp-plugins/disable-cart-fragments)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/disable-cart-fragments/),
check out the [SVN repository](https://plugins.svn.wordpress.org/disable-cart-fragments/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/disable-cart-fragments/)
by [RSS](https://plugins.trac.wordpress.org/log/disable-cart-fragments/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 2.4.1

 * Bug fix.

#### 2.4

 * Tested and ensured compatibility with the latest versions of WordPress, WooCommerce
   and PHP.
 * Cleaned up the code a bit.

#### 2.3

 * Tested and ensured compatibility with WordPress 6.2 and WooCommerce 7.8.0.
 * Fixed an issue: Store managers were unable to dismiss the notices.

#### 2.2

 * Tested and ensured compatibility with PHP 8.1, WordPress 6.1.1 and WooCommerce
   7.3.0.
 * Added the necessary HPOS (High-Performance Order Storage) compatibility code.

#### 2.1.1

 * Version bumps to ensure DCF is working with WordPress 6.0 and WooCommerce 6.5.1.

#### 2.0

 * Turns out WordPress thinks v1.21 is “newer” than 1.4 – kind of makes sense; we
   should’ve made v1.21 as v1.2.1. Anyway, we’re releasing v2.0 which is the same
   as v1.4 but this will set the record straight and people using v1.21 will get
   updates this time.

#### 1.4

 * Tested up to WordPress’s and WooCommerce’s latest versions.
 * Fixed non-dismissible notice.
 * New uninstall.php.

#### 1.21

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

#### 1.2

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

#### 1.01

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

#### 1.0

 * Initial release

## Meta

 *  Version **2.4.1**
 *  Last updated **11 months ago**
 *  Active installations **10,000+**
 *  WordPress version ** 4.6 or higher **
 *  Tested up to **6.8.5**
 *  PHP version ** 5.6 or higher **
 *  Languages
 * [English (US)](https://wordpress.org/plugins/disable-cart-fragments/), [Hungarian](https://hu.wordpress.org/plugins/disable-cart-fragments/),
   [Russian](https://ru.wordpress.org/plugins/disable-cart-fragments/), [Spanish (Chile)](https://cl.wordpress.org/plugins/disable-cart-fragments/),
   [Spanish (Colombia)](https://es-co.wordpress.org/plugins/disable-cart-fragments/),
   [Spanish (Spain)](https://es.wordpress.org/plugins/disable-cart-fragments/), 
   [Spanish (Venezuela)](https://ve.wordpress.org/plugins/disable-cart-fragments/),
   and [Turkish](https://tr.wordpress.org/plugins/disable-cart-fragments/).
 *  [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/disable-cart-fragments)
 * Tags
 * [cart fragments](https://wordpress.org/plugins/tags/cart-fragments/)[woocommerce](https://wordpress.org/plugins/tags/woocommerce/)
 *  [Advanced View](https://wordpress.org/plugins/disable-cart-fragments/advanced/)

## Ratings

 4.9 out of 5 stars.

 *  [  15 5-star reviews     ](https://wordpress.org/support/plugin/disable-cart-fragments/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/disable-cart-fragments/reviews/?filter=4)
 *  [  1 3-star review     ](https://wordpress.org/support/plugin/disable-cart-fragments/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/disable-cart-fragments/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/disable-cart-fragments/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/disable-cart-fragments/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/disable-cart-fragments/reviews/)

## Contributors

 *   [ Optimocha ](https://profiles.wordpress.org/optimocha/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/disable-cart-fragments/)