WooCommerce cart fragments are the script that updates the shopping cart without reloading the page, and for years they were one of the most common causes of slow online shops. Slow performance and errors on WooCommerce websites are often caused by a large number of AJAX requests, because these requests are not cached. Since 2023, though, WooCommerce has changed how it loads cart fragments, and today the biggest similar problem we see on our servers comes from elsewhere: bots hitting add-to-cart and filter URLs.
We wrote this article in 2021. We updated it in 2026 with what still applies to cart fragments and with the problem that has replaced them.
What is get_refreshed_fragments
get_refreshed_fragments is the AJAX request the cart fragments script sends to the server to get the current state of the cart. It exists so the mini cart, meaning the item count and total in the header, updates without the page reloading.
The problem is that this request cannot be served from caching. Every visitor on every page triggers PHP on the server, even on static posts, pages and feeds that have nothing to do with the cart. That reduces cacheability and loads the server.
You can spot it with any page speed test or in your website's Access Log. The request looks like this:
https://domain.gr/?wc-ajax=get_refreshed_fragments
And in the Access Log it appears as a POST to the same URL:
POST /?wc-ajax=get_refreshed_fragments HTTP/2.0
What changed in WooCommerce 7.8
In WooCommerce 7.8, cart fragments stopped loading on every page. According to the WooCommerce Developer Blog from June 2023, the script now loads only when the page renders the cart widget, or when a theme or plugin asks for it.
That means on an up-to-date shop the problem may already be solved on its own. However, several themes, as WooCommerce itself notes for Storefront, include the cart widget in the header, so cart fragments load on every page again. The solution WooCommerce recommends is the Mini-Cart block, which does not use the cart fragments API at all.
Disable WooCommerce cart fragments, when you still need to
You still need to disable WooCommerce cart fragments when your theme loads the old cart widget on every page and you cannot replace it with the Mini-Cart block. Before doing anything, check the Access Log for get_refreshed_fragments requests. If there are none, there is nothing to disable.
If there are, the options in the order we recommend them are:
- Mini-Cart block. Replace the cart widget with the Mini-Cart block, as WooCommerce recommends. It is the only solution that keeps the cart updated without cart fragments.
- Perfmatters. Perfmatters disables cart fragments when the cart is empty, which covers most visitors, and enables them as soon as someone adds a product.
- Code in functions.php. The Business Bloomer guide shows how to disable them from your child theme's
functions.php.
The free Disable Cart Fragments plugin we suggested in 2021 still exists, but according to wordpress.org it has not been tested with the last three major WordPress releases. That is why we no longer recommend it as a first choice.
Bots on add-to-cart and filter URLs, the problem of 2026
Bots on add-to-cart and filter URLs are today among the most common reasons we see a WooCommerce shop hit the CPU limit of its plan, and in essence they are the same problem as cart fragments at a larger scale. Again these are requests that cannot be served from cache, and each one runs PHP and writes to the database.
The heaviest requests are:
?add-to-cart=. Each request creates a session and writes to the database, as if someone had really added a product to the cart.- Product filters, such as
?filter_color=or?orderby=. Every combination of filters is a new URL and a new database query. /cart/and/checkout/. WooCommerce never caches them, because they show each visitor's own cart.
Kinsta reported in June 2026 that within 24 hours it measured 7.67 million add-to-cart requests from just five bots. We saw the same on our own servers. In September 2026 a declared crawler made about 93,000 requests a day to the filter URLs of a single shop, while on other shops botnets with fake Chrome User-Agents sent every request from a different IP, with no Referer, to add-to-cart and filter URLs. In those cases the homepage kept loading normally from cache, while the cart and the filtered pages returned errors.
WooCommerce robots.txt
A WooCommerce robots.txt is the first and safest measure, because it tells crawlers that respect the rules not to follow URLs search engines do not need. Google recommends exactly this for filters, if you do not want them in search results. An example:
User-agent: *
Disallow: /*add-to-cart=*
Disallow: /*add_to_wishlist=*
Disallow: /*?*filter_
Before adding the filter line, make sure you do not want any filtered pages to appear in Google, because it affects SEO. If your cart and checkout use Greek slugs, such as /kalathi/, use your own slugs rather than /cart/ and /checkout/.
But robots.txt is a signal, not protection. Google, Bing and most declared crawlers respect it, but a botnet with a fake User-Agent ignores it. That is why on our servers online shops are also protected by Imunify360 and our own internal security tools, with the rule that a real visitor or a search engine crawler is never blocked.
LiteSpeed Cache and WooCommerce
LiteSpeed Cache and WooCommerce work together so that product and category pages are served from cache to visitors, while the cart, checkout and customer account stay outside the cache. That is why every request that bypasses the cache, such as cart fragments, add-to-cart and filters, matters so much for a shop's performance.
Three things are worth checking regularly. Whether caching is active in the LiteSpeed Web Cache Manager, whether the Access Log shows a large number of get_refreshed_fragments, add-to-cart or filter_ requests, and whether resource usage in cPanel Resource Usage often reaches the limit. For database object caching, also see how to enable Redis Object Cache in WordPress.
One more lesson from the 2026 incidents is that an uptime check on the homepage alone is not enough for an online shop, since the homepage can load from cache while the cart is failing. For large shops with heavy traffic, Semi Dedicated Hosting plans give several times the CPU and RAM limits.
This article is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). You may republish it, provided you credit Konet as the source with a link to this article.


