Skip to content
WP Cloud
WP Cloud
    • For Hosts
    • For Agencies
    • For Registrars
    • For Native Hosting
    • Performance
    • Security
    • Real-Time Automated Failover
    • Vertical Scaling and Bursting
    • WordPress Management
    • PanelAlpha Integration: White-Label WordPress Control Panel for Hosts
    • EasyEngine Panel Integration: Visual WordPress Management for WP Cloud
    • FAQs
    • WP Cloud API
    • Partner Portal
    • Documentation
    • New Partner Guide
    • Pressable
    • Convesio
    • Porkbun
    • PanelAlpha
    • Ivapix
    • UNC Greensboro
    • Impressive Hosting
    • Blog
    • Performance Benchmarks
  • Connect With Us
  • Login ↗
Start Here ↗
  • Solutions

    • For Hosts
    • For Agencies
    • For Registrars
    • For Native Hosting
    • Featured Partners

    Features

    • Performance
    • Security
    • Real-Time Automated Failover
    • Vertical Scaling and Bursting
    • WordPress Management

    Integrations

    • PanelAlpha Integration
    • Easy Engine Panel Integration

    Resources

    • Documentation
    • WP Cloud API
    • FAQs
    • Partner Portal
    • New Partner Guide
    • Announcements
    • Changelog
  • Case Studies
    • PressableA case study about how WP Cloud supports Pressable to power millions of page views daily.
    • Convesio
    • Porkbun
    • PanelAlpha
    • Ivapix
    • UNC Greensboro
    • Newspack
    • Inverse Paradox
  • Insights
    • Podcast
    • BlogWP Cloud blog page with latest news and updates about the platform.
    • Performance Benchmarks
  • Connect With Us
  • Login ↗
Start Here ↗

Browse

    • WP Cloud platform overview
    • Onboard and launch with WP Cloud
    • WP Cloud Partner Portal
    • Get support from WP Cloud
    • WP Cloud glossary
    • API Documentation
    • Manage and secure API keys
    • Client SSH
    • WP Cloud API quick start
    • Webhooks
    • Run bulk tasks across sites
      • Manage site domains and aliases
      • Domain verification records
      • TLS certificates
      • Manage custom TLS certificates
      • Cloudflare and WP Cloud
    • Clone a site
    • Configure resources, site type, and billing with site meta
    • Delete a site
    • Persistent data
    • Staging sites
    • Migrate a site to WP Cloud
      • SSH and SFTP access models
      • Client SSH
      • User SSH and SFTP access
      • Database credentials
      • phpMyAdmin
      • ABSPATH
      • Default wp-config.php
      • Site constants
      • Configure redirects and headers with custom-redirects.php
      • Akismet and Jetpack
      • Blocked and unsupported plugins
      • PHP lifecycle and supported versions
      • Symlinks and managed software
      • WordPress versions
      • Install Composer and WP-CLI packages
      • Manage platform software with WP-CLI
      • Useful WP-CLI commands
    • Transactional email
    • WordPress multisite
    • Cron scheduling
    • Decoupled and headless WordPress
    • Repair Yoast indexables
      • Edge Cache preload
      • WooCommerce cart caching
      • Page Cache
      • Edge Cache
      • Object Cache
      • Image transformation
      • Offload image sub-sizes
    • Configure lightweight 404s for static files
      • Edge Rules overview
      • Edge Rule types
      • Edge Rule conditions
      • Verify Edge Rules
      • Edge Cache preload
      • WooCommerce cart caching
      • Edge Cache
    • Edge request logs
      • DDoS protection
      • Defensive Mode
      • Rate limiting
      • Network and web application firewalls
      • Bot protection
      • Password protection
      • HTTP and security headers
      • PHP filesystem access permissions
      • Scan a site for malware
    • Backups overview
    • Create an on-demand backup
    • Restore a backup
    • Jetpack backups
      • Error logs
      • Web server logs
      • Edge request logs
    • Usage reporting
    • Metrics
    • Application performance monitoring
    • Automated failover
    • IP ranges
    • Origin and edge servers
    • Server specifications and settings
    • EasyEngine integration
    • PanelAlpha integration
      • White labelling and co-marketing WP Cloud
      • WP Cloud logos
      • Terms of Service & Compliance
      • Prohibited content
      • Copyright infringement and takedown notifications
    • WP Cloud billing
    • WP Cloud for agencies and site networks
    • WP Cloud partner support options
    • Troubleshoot Page and Edge Cache
    • Troubleshoot HTTP 429 and 599 errors
    • WP Cloud HTTP status codes
    • Troubleshoot site performance
    • Cache slow database queries
    • Troubleshoot duplicate core files, wp-config.php, and wp-admin 403 errors
    • Troubleshoot email delivery
    • Troubleshoot PDF thumbnail generation
    • Troubleshoot TLS certificate provisioning

Updates

  • Changelog
  • WP Cloud Status
  • Announcements
Documentation/Performance/Cache/WooCommerce cart caching

WooCommerce cart caching

LAST UPDATED

1 month ago

    WooCommerce cart caching lets visitors with items in their WooCommerce cart receive eligible pages from Edge Cache. WooCommerce then loads the visitor’s cart details dynamically.

    Closed beta: This feature is available only to enabled WP Cloud partner accounts. Partners without access can contact WP Cloud Support to express interest in exploring or testing it.

    How cart caching works

    Shopping cart cookies normally cause requests to bypass Edge Cache. With WooCommerce cart caching enabled, visitors with cart cookies can receive the cached, empty-cart version of an eligible page. WooCommerce’s JavaScript then updates the cart elements for that visitor. The cart may appear empty briefly while the page loads.

    Cart details remain specific to each visitor. Requests with cart cookies can read cached pages, but their responses are never written into Edge Cache. The feature does not turn the cart or checkout into shared cached pages. Logged-in WordPress sessions still bypass Edge Cache.

    Classic themes rely on WooCommerce cart fragments to refresh cart elements. Block themes use the WooCommerce Store API. Incompatible themes or plugins may display empty cart elements even when the visitor has items in the cart.

    Test each site’s theme and plugins before enabling this feature for all visitors. Do not use the Page Cache cookie bypass settings to ignore cart or authentication cookies as a substitute.

    Test in one browser

    Use this browser-only test before enabling cart caching for the site. Your partner account must have access to the closed beta.

    1. Open the store in a private browsing window while logged out of WordPress.
    1. Open the browser’s developer console on the store’s domain and set the test cookie:
    document.cookie='a8c_edge_enable_woocommerce_cart_caching=1; path=/;'Code language: JavaScript (javascript)
    1. Add items to the cart and browse product and other cacheable pages. Inspect the x-ac response header for Edge Cache results.
    1. Confirm that cart icons, counts, mini-carts, and totals update after each page loads. Test quantity changes, removing items, and the cart and checkout flow.
    1. Check a separate private browser session to confirm that each visitor sees their own cart details.

    If cart elements remain empty or incorrect, resolve the theme or plugin integration before enabling the feature for the site.

    Set the cookie only in your own browser for testing. Do not add site code that sets it for visitors. For permanent enablement, use the site-level API control below.

    To remove the test cookie, run this in the same browser on the store’s domain:

    document.cookie='a8c_edge_enable_woocommerce_cart_caching=; Max-Age=0; path=/;'Code language: JavaScript (javascript)

    Removing the cookie ends the browser-only opt-in. If cart caching is enabled through the API, use the API to disable it.

    Enable or disable cart caching

    After testing compatibility, your partner’s authenticated WP Cloud API integration can enable the feature for the site. Replace <site-id> with its Atomic Site ID. These beta endpoints are not yet listed in the public API reference.

    Send this request with an application/x-www-form-urlencoded body. Use enable=1 to enable cart caching, or enable=0 to disable it:

    POST /edge-cache/<site-id>/woo_cart_cacheCode language: HTML, XML (xml)

    Omitting the POST body also enables the feature. Check whether it is enabled with:

    GET /edge-cache/<site-id>/woo_cart_cacheCode language: HTML, XML (xml)

    Both requests return the setting in data.enabled. Without a domain in the path, the requests use the site’s primary domain. To control or check another domain on the site, replace <domain> with that domain:

    POST /edge-cache/<site-id>/woo_cart_cache/<domain>
    GET /edge-cache/<site-id>/woo_cart_cache/<domain>Code language: HTML, XML (xml)

    The POST request uses the same enable field. The GET request reads the setting for the specified domain.

    After enabling the feature, repeat your browser checks without the test cookie. If the site shows incorrect cart elements, disable the feature while you investigate compatibility.

    Previous Edge Cache preload
    Next Page Cache

    Related Guides

    • Edge Cache preload

      Preload linked pages into a secondary cache, monitor crawl progress, and verify Edge Cache preload…

      3 Min.

      READ

    • Page Cache

      Learn how WP Cloud Page Cache works, verify Batcache hits, change cache lifetime, and configure…

      4 Min.

      READ

    • Edge Cache

      Partner engineers and support teams can understand, manage, purge, and verify Edge Cache through WP…

      8 Min.

      READ

    On this page

      Contact support

      Contact us with Support issues and questions related to WP Cloud, the WP Cloud Atomic API, API-key IP allow list changes, Station, and more.

      Check the FAQs

      Have questions? Please visit our FAQ to learn more.

      An Automattic venture

      Work With Us

      Press

      Privacy Policy

      © 2021-2026 Automattic Inc.

      Notifications