MageSentinel

Cart fragments and a slow WooCommerce store

Cart fragments is the small AJAX request WooCommerce uses to keep the mini cart in the header up to date. On a busy store it can mean one uncached PHP request per page view — load that competes directly with the checkout.

All posts1 min read

An hourglass on a table

What it does

The `wc-ajax=get_refreshed_fragments` request returns the current cart contents so the header can show the right count. Because it is personal, it cannot be cached, and it runs PHP — using the same workers the checkout needs.

Recent WooCommerce versions load the script only where the mini cart needs it, but themes and plugins often load it everywhere again.

Why it matters for checkout

Under load, these requests queue up with checkout requests for the same PHP workers. The checkout slows first because it cannot be cached — see WooCommerce under load.

Disabling fragments carelessly causes the opposite problem: a header that shows an empty cart after adding a product, which customers read as “add to cart is broken”.

Handling it

Measure first: count fragment requests in your logs and check response time. If needed, load fragments only on pages with a mini cart, or switch to a mini cart that updates only after cart changes.

After the change, test add to cart from product and category pages and confirm the header updates. A scheduled checkout check that starts from the product page catches a cart that no longer updates.

Check your own store now with the free WooCommerce checkout checker: it walks the checkout in a real browser and shows the step where it stops.

When totals or shipping do not refresh, see WooCommerce update_checkout not working.

Common questions

What are WooCommerce cart fragments?

An AJAX request (wc-ajax=get_refreshed_fragments) that refreshes the mini cart and cart count on cached pages.

Should I disable cart fragments?

Only where you do not need a live mini cart; recent WooCommerce versions load the script only when needed. Test add to cart and the mini cart after any change.

Why do cart fragments matter for checkout?

Each request is uncached and uses a PHP worker, so on busy stores they compete with checkout requests.