Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk11 min

How to Fix the WooCommerce Cart Fragments Performance Problem

WooCommerce 7.8 stopped loading cart fragments globally by default, but themes and plugins can still trigger unnecessary AJAX work. This guide shows how to find the enqueue, choose between removing it, using the Mini Cart Block, or applying WooCommerce’s official filter, and keep cart sessions cache-safe.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The safe fix is to stop wc-cart-fragments from running on pages that do not need a live legacy mini-cart—not to disable it blindly. First identify what enqueues the script, then remove an accidental global enqueue, replace the legacy Cart Widget with WooCommerce’s Mini Cart Block where your theme supports it, or scope execution with WooCommerce’s official filter. Keep cart-related pages and sessions dynamic, and test every add-to-cart and checkout path on staging before deploying.

What WooCommerce cart fragments do

WooCommerce cart fragments are a frontend JavaScript mechanism for keeping a mini-cart current without reloading the whole page. The script asks the server for refreshed mini-cart HTML and cart state through WordPress’s AJAX infrastructure, then replaces the relevant fragment in the page. This is useful when a shopper adds or removes an item while remaining on a product, article, or landing page.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The legacy implementation is commonly identified by the script handle wc-cart-fragments. Its data includes an AJAX URL, a cart-hash key, a fragment name, and a request timeout of 5000 milliseconds. Requests can be initiated by cart events such as wc_fragment_refresh and updated_wc_div, by restoring a page from browser history, by Customizer behavior, and by a timeout intended to reduce stale cart displays.

The performance problem occurs when this work runs on routes that have no mini-cart or other cart-dependent interface. Every unnecessary request still enters the WordPress/WooCommerce request path, reads or updates session-related state, and consumes PHP, database, and web-server capacity. The exact impact depends on traffic, hosting, theme, plugins, and cache configuration; WooCommerce’s official material does not establish a universal number of milliseconds saved or a standard conversion increase.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Why the issue still appears after WooCommerce 7.8

WooCommerce changed the default in version 7.8. The developer announcement states that the cart-fragments script is no longer enqueued on every store route by default. It is normally loaded when the legacy Cart Widget is rendered, when another script declares it as a dependency, or when code explicitly enqueues it.

That change prevents many unnecessary requests, but it does not guarantee that an individual site is fixed. A theme can hard-code the Cart Widget in its header or sidebar, and a plugin can declare wc-cart-fragments as a dependency. Custom code can also enqueue it directly. A site upgraded from an earlier WooCommerce version may therefore retain the same network request even though the platform default changed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not remove the script merely because it appears in page source. A live legacy mini-cart, a custom header counter, or JavaScript that listens for fragment events may depend on it. The correct target is the page and interface that need the behavior, not the asset in isolation.

Diagnose the request before changing code

Use a staging copy whenever possible. The goal is to identify who loads the script, where the request is sent, and which routes actually need live cart updates.

  1. Capture the request. Open your browser’s developer tools, select the Network panel, enable the option to preserve the log, and reproduce the slow page load. Filter for wc-cart-fragments, get_refreshed_fragments, admin-ajax.php, and wc-ajax. Record the request URL, timing, status code, initiator, and whether it occurs during the initial load or after a cart event.
  2. Inspect the rendered page. Look for a legacy Cart Widget in the header, navigation drawer, sidebar, footer, or a theme-specific mini-cart. A widget that is visually hidden with CSS can still cause the script to load if it remains in the markup.
  3. Check dependencies. Inspect the page’s enqueued scripts and the initiator chain in DevTools. Search the active theme, child theme, and plugins for wp_enqueue_script( 'wc-cart-fragments' ) and for dependency arrays containing wc-cart-fragments. Also check theme options that insert a cart widget without an obvious WordPress widget-area label.
  4. Compare routes. Test an ordinary content page, a product page, the shop page, Cart, Checkout, and My Account. Then compare a page with the mini-cart removed to the same page with it present. Note whether the asset or the AJAX request disappears. This isolates an enqueue problem from a server-response problem.
  5. Exercise real cart behavior. On staging, add a product, verify the cart count, remove the product, return to a previous page with the browser Back button, and complete a checkout test. Include logged-out and logged-in sessions if your store supports both. A change that makes a page faster but leaves a stale count or broken remove link is not a successful fix.

A slow admin-ajax.php request is a symptom, not proof that the script should be disabled everywhere. Use server timing and application logs to determine whether the request is repeated unnecessarily or whether a route that genuinely needs a mini-cart is simply slow.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Fix 1: remove an accidental global enqueue

If a theme or plugin loads wc-cart-fragments on every route without providing a live cart UI, correct that enqueue at its source. This is the cleanest solution because unrelated pages no longer download or execute the asset.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Ask the theme or plugin maintainer for an update first. If you control the code, remove the unconditional enqueue and add the script only to templates that render the legacy Cart Widget or an equivalent interface. Do not dequeue it late in the page lifecycle while leaving markup that expects fragment events; that can produce a non-updating cart count or JavaScript errors.

WooCommerce documents manual enqueueing for stores whose custom interfaces provide functionality equivalent to the widget. That means a custom header cart may still require the script even when no standard widget appears in the WordPress Widgets screen. Document the dependency in your theme or plugin so a future upgrade does not reintroduce a global load.

Fix 2: replace the legacy widget with the Mini Cart Block

WooCommerce’s 7.8 release information recommends the Mini Cart Block as an alternative to the legacy widget’s performance behavior. The block is designed for the block-based editor and can avoid the old widget-driven cart-fragment pattern in compatible setups.

When the block is a good fit

  • Your active theme supports the Site Editor or block-based template editing.
  • The header or navigation can be edited without a theme-specific widget wrapper.
  • Your add-to-cart extensions and product types work with the block’s cart-count and drawer behavior.
  • You can test desktop, mobile, logged-out, logged-in, and cached sessions before launch.

Migration checks

  1. Duplicate the production site in staging and record the current mini-cart behavior, including item count, subtotal, remove links, coupons, and quantity changes.
  2. Replace the legacy Cart Widget in the header or template with the Mini Cart Block using your theme’s editor.
  3. Clear page, object, browser, and CDN caches on staging.
  4. Test product-page add-to-cart, shop-page add-to-cart, variable products, downloadable or subscription products if applicable, remove-item actions, and checkout hand-off.
  5. Inspect Network requests. Confirm that the old fragment request is gone where it is not needed, while cart interactions still update the visible count and contents.

Do not assume that installing the block automatically resolves every request. A separate plugin, custom header, or dependency can still enqueue wc-cart-fragments. Re-run the network and dependency checks after the migration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Fix 3: scope execution with WooCommerce’s official filter

If the script must remain available for some templates but should not execute on unrelated routes, WooCommerce documents the woocommerce_get_script_data filter. The following pattern returns normal script data on WooCommerce, Cart, and Checkout pages and returns null elsewhere:

<?php
add_filter( 'woocommerce_get_script_data', function( $script_data, $handle ) {
    if ( 'wc-cart-fragments' === $handle ) {
        if ( is_woocommerce() || is_cart() || is_checkout() ) {
            return $script_data;
        }
        return null;
    }
    return $script_data;
}, 10, 2 );

Place site-specific PHP in a child theme or a maintained functionality plugin rather than editing a parent theme. Deploy it to staging first, and confirm that the filter runs after WooCommerce is available.

How this filter changes behavior

The asset can remain registered and present, but the script receives no data on routes outside the allowed conditions, so it does not perform its normal fragment-refresh work there. This is different from blindly deregistering the file and is useful when another component expects the handle to exist.

Adapt the conditions to your store

The example is intentionally narrow. If a landing page, membership area, product configurator, or custom checkout step displays a live mini-cart, add that route to the condition. Conversely, a store may have product pages that do not show a mini-cart; whether those pages belong in the allow-list depends on the actual interface and add-to-cart flow.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

WooCommerce’s caveat is important: non-standard pages can stop updating their mini-cart if they are excluded. Test every custom route that displays cart state. A filter that improves a benchmark page but breaks a campaign page is the wrong scope.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Fix 4: make caching cart-safe

JavaScript changes cannot compensate for an unsafe cache. Cart and session state must be treated as shopper-specific.

  • Keep Cart, Checkout, and My Account dynamic. These pages contain changing customer, order, or session information and should not be served as a single shared HTML response.
  • Exclude WooCommerce session data from shared caching. Review page-cache, object-cache, reverse-proxy, and CDN rules for WooCommerce session cookies and other cart-related cookies used by your installation.
  • Verify cache variation. A cached response that contains one shopper’s cart count or cart HTML and is delivered to another shopper is a correctness and privacy failure, not merely a performance trade-off.
  • Purge after configuration changes. Clear all relevant cache layers after changing widget markup, script dependencies, cookie rules, or filter code.

Some content pages can remain cached while still allowing a cart interface to update through a safe, shopper-specific request. The exact exclusions depend on your cache stack and WooCommerce extensions, so validate the resulting headers, cookies, and response body rather than copying a generic rule.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose the right fix for each page

Situation Preferred action Why Required validation
A theme or plugin enqueues the script everywhere, but no live mini-cart exists on most routes Remove or correct the global enqueue Eliminates unnecessary download and execution at the source Confirm the dependency is gone and cart flows still work
The site uses a compatible block-based theme Replace the legacy widget with the Mini Cart Block WooCommerce documents it as an alternative to the legacy widget’s performance issue Test all product types, count updates, remove actions, and mobile navigation
A custom interface needs the handle available, but unrelated routes do not need live updates Use the official data filter with a store-specific allow-list Scopes execution without indiscriminately removing the registered asset Include every custom page that displays cart state
A legacy mini-cart is required on many pages Keep cart fragments where the interface genuinely depends on them Removing the script would break expected live behavior Measure request count and duration, then optimize hosting and cache rules
Cart counts or contents appear to belong to another shopper Fix cache exclusions before changing JavaScript Shared cart state is a correctness failure Test separate browser sessions and inspect cache headers and cookies

Why admin-ajax.php can look slow

The fragment request uses WordPress’s AJAX API, so the browser may show admin-ajax.php even though the underlying work is WooCommerce cart handling. The request can be visible on pages that do not look like store pages because a globally loaded script does not know whether a shopper will interact with the cart until it runs.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Measure the request in context. Record whether it happens once or repeatedly, its server-wait time, response size, status, and the page’s cache state. A repeated request on an article with no mini-cart points toward an enqueue or execution-scope problem. A slow request on Checkout, where cart state is required, is a different performance investigation and should not be “fixed” by suppressing cart updates.

There is no official universal benchmark for milliseconds saved, server-cost reduction, or conversion lift from disabling cart fragments. Results vary with traffic, PHP workers, database load, extensions, theme code, hosting, and cache configuration. Use DevTools, server logs, and representative staging traffic to establish your own baseline.

Testing checklist before production

  • Test a normal content page with no cart UI and verify that no unnecessary fragment request is made.
  • Test a product page with the chosen mini-cart implementation and verify the count changes after add-to-cart.
  • Test a variable product and any subscription, bundle, membership, or custom product type your store sells.
  • Remove an item from the mini-cart and verify both the visible contents and subtotal update.
  • Use browser Back and Forward navigation and confirm that the displayed cart state is not stale.
  • Test logged-out and logged-in shoppers in separate browser profiles.
  • Test mobile menus, off-canvas headers, and sticky headers; these often contain a second cart interface.
  • Open Cart, Checkout, and My Account and confirm they remain dynamic and functional.
  • Inspect cache headers and cookies, and verify that one browser cannot see another browser’s cart count or HTML.
  • Repeat the test after clearing every cache layer and after a normal cache warm-up.

Common failure modes and recovery

The request remains after upgrading to WooCommerce 7.8

Check for a hard-coded Cart Widget, a plugin dependency, or an explicit enqueue. The 7.8 default only prevents WooCommerce from globally enqueuing the script by default; it cannot override theme and plugin code that asks for it.

The mini-cart stops updating on a custom landing page

Your filter allow-list is too narrow for that page. Add the route’s condition, or keep the script data available where the custom interface actually needs fragment events. Retest add, remove, and browser-history flows.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The cart count is stale after switching to the block

Confirm that the old widget was fully removed, that no second header or mobile widget remains, and that caches were purged. Then inspect the block’s JavaScript and the Network panel for errors or failed cart requests.

Two shoppers see the same cart state

Stop treating this as an AJAX optimization. Review page-cache, CDN, reverse-proxy, and object-cache rules for WooCommerce sessions and cart cookies, make Cart, Checkout, and My Account dynamic, purge caches, and retest in isolated browser sessions.

Removing the script breaks a custom cart counter

Restore the dependency and identify which code listens for fragment events or expects refreshed fragment HTML. Either retain the script on the routes where that counter exists or refactor the counter to a cart implementation compatible with your chosen block or endpoint.

Maintain the fix through WooCommerce updates

Record why the script is loaded, which templates contain a mini-cart, and which conditions are included in any filter. After WooCommerce, theme, or header-navigation updates, repeat the route comparison and cart-flow checklist. A release can change a widget implementation, add a dependency, or alter a custom template without changing your own code.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep performance and correctness metrics together: request count, request duration, cache status, cart-count accuracy, add-to-cart success, remove-item success, and checkout completion. A lower request count is valuable only when the shopper still sees accurate cart state and can complete an order.

Bottom line

Start with diagnosis, not a blanket dequeue. Remove a global enqueue when no live legacy mini-cart needs it; use the Mini Cart Block where your theme and extensions support it; otherwise scope wc-cart-fragments with the official filter and include every custom page that displays cart state. Keep WooCommerce session and cart data out of shared caches, leave Cart, Checkout, and My Account dynamic, and verify the complete shopping journey on staging. Because official sources provide no universal savings figure, publish or deploy the change only after measuring your own store.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.