Skip to main content
KadiCache
Browse 37 Docs Guides & Search

WooCommerce Carts, Checkouts, 8 Express Wallets & 6 Wishlists

Protect WooCommerce sessions, carts, checkouts, Smart Cart Fragments, 8 express payment wallets (PayPal FraudNet, Apple Pay, Stripe, Square, Revolut), and 6 wishlist counters.

Integrations/Plugins/WooCommerceSession.phpIntegrations/Plugins/WooCommerceCartFragments.phpIntegrations/Plugins/OfficialPaypal.phpIntegrations/Plugins/WishlistReuse.php
WP Admin -> KadiCache -> WooCommerce (Smart Cart Fragments)
MODULE 29 · 2X RETINA
Smart WooCommerce Cart Fragments eliminates uncached wc-ajax=get_refreshed_fragments requests for browsing guests while syncing active carts.2880×1840 WebP
Quick Summary · 30-Second Operational SpecSource-Verified Guide
WP Admin Path
WP Admin -> KadiCache -> CSS & JavaScript (Commerce & Smart Cart)
Expected Outcome
0 Cart/Session Bleed · 8 Express Wallets · 6 Wishlist Integrations
Key Marker / Engine
WooCommerceSession.php | OfficialPaypal.php | WishlistReuse.php
  • Distinguishes empty browsing sessions from populated carts, customer notices, tax/shipping addresses, and private discounts (WooCommerceSession.php) so window-shoppers get ~14 ms Early HITs while active carts stay 100% private.
  • Smart Cart Fragments (WooCommerceCartFragments.php + WooCommerceMiniCartBlock.php): Eliminates uncached /?wc-ajax=get_refreshed_fragments blocking calls for empty-cart guests while keeping Classic & Block Mini-Carts live once an item is added.
  • Built-in safeguards for 8 Express Payment Wallets (including per-browser kadicache_ppcp_fn PayPal FraudNet isolation) and 6 Wishlist Plugins (YITH, TI, WPC, MoreConvert, WCBoost, QODE).
  • Surgical stock & price invalidation purges affected product and archive URLs automatically when inventory changes or orders complete.

Solving the #1 Fear of WooCommerce Store Owners: Speed Without Cart Bleed#

Every WooCommerce merchant has heard horror stories of aggressive caching plugins showing Customer A’s shipping address inside Customer B’s checkout, freezing the header mini-cart counter at 0, or breaking Apple Pay and PayPal Express buttons on product pages.

At the opposite extreme, naive stores turn caching off whenever wp_woocommerce_session_* appears—causing 70%+ of browsing shoppers to miss cache even when their cart is completely empty! KadiCache Free Core (WooCommerceSession.php, PrivateCommerceRoutes.php, WooCommerceCartFragments.php, and 14 dedicated wallet/wishlist integrations) engineers surgical eCommerce safety out of the box.

FIG 01Configuring Smart WooCommerce Cart Fragments, Native Mini-Cart Cache Support, and Shopper Delay JS inside WP Admin -> KadiCache -> CSS & JavaScriptZoom 2x

Four-Layer Session, Route & Tax Protection (WooCommerceSession.php)#

  1. Automatic Private Route Isolation (PrivateCommerceRoutes.php): Dynamic WooCommerce /cart/, /checkout/, /my-account/, order-pay, Easy Digital Downloads checkout, and membership/LMS account endpoints are detected dynamically via WordPress page IDs and rewrite rules (across every translated slug!) and never enter shared public cache.
  2. Active Cart & Notice Bypass (WooCommerceSession::isPrivate()): As soon as woocommerce_items_in_cart (non-zero) or woocommerce_cart_hash is set—or WC()->session holds wc_notices—Early Delivery immediately returns X-KadiCache: BYPASS (X-KadiCache-Reason: bypass_cookie) so personalized cart totals and notices stay strictly per-shopper.
  3. Empty Session Verification (WooCommerceSession::emptyNewSession()): If a plugin initializes an empty default WC_Session_Handler row with $0.00 totals, default customer location (WC_Customer_Data_Store_Session::is_default_customer_data()), and zero coupons, KadiCache verifies it mathematically so window-shoppers continue receiving fast cached catalog pages!
  4. Geolocation Tax & Dynamic Discount Guards (WooCommerceSession::sharedLookupRisk()): Automatically detects tax-inclusive geolocation pricing (woocommerce_default_customer_address = geolocation), customer-address tax calculation (woo_session_tax), Price Based on Country (WCPBC), and session-bound DiscountRules.php so customer-specific prices can never leak into shared HTML.

Taming wc-ajax=get_refreshed_fragments & Gutenberg Mini-Cart Blocks#

By default, WooCommerce fires an uncached POST /?wc-ajax=get_refreshed_fragments request on every single pageview, adding 450 – 1,400 ms to mobile load even when 92% of visitors have 0 items in their cart:

  • Smart Cart Fragments (WooCommerceCartFragments.php): Skips the expensive network AJAX call for empty-cart guests while automatically syncing the header cart badge the instant a shopper clicks Add to Cart or carries woocommerce_items_in_cart.
  • WooCommerce Block Mini-Cart (WooCommerceMiniCartBlock.php): Supports modern Gutenberg Interactivity API / React <div class="wc-block-mini-cart"> drawers cleanly alongside classic jQuery theme carts.

Built-In Support for 8 Express Payment Wallets & Meta CAPI Safety#

Express checkout buttons on /product/* pages embed gateway tokens, client nonces, or fraud-prevention identifiers that break if shared blindly across guests. KadiCache includes dedicated Free Core integrations for 8 payment gateways plus Meta for WooCommerce:

Express Gateway / IntegrationFree Core Guard (src/Integrations/Plugins/)What KadiCache Protects Automatically
WooCommerce PayPal Payments (PPCP)OfficialPaypal.phpIsolates per-browser FraudNet tokens (kadicache_ppcp_fn) & recognizes safe public guest nonces
EasyPayment PayPalEasypaymentPaypal.phpProtects PayPal smart button session state on product templates
FunnelKit Stripe Payment GatewayFunnelkitWallet.phpPreserves Apple Pay / Google Pay / Express Checkout payment request data
ThemeHigh StripeThemehighStripe.phpSafeguards Stripe express button initialization & nonces
WooCommerce SquareSquareWallet.phpProtects Square Digital Wallet (Apple Pay / Google Pay) product buttons
Mollie Payments (Apple Pay)MollieApplePay.phpKeeps Mollie Apple Pay direct product buttons functional on cached pages
Revolut Gateway for WooCommerceRevolutExpress.phpProtects Revolut Pay / Express checkout tokens
Airwallex Express CheckoutAirwallexWallet.phpSafeguards Airwallex Apple Pay / Google Pay express flows
Meta for WooCommerce (Pixel + CAPI)MetaForWooCommerce.phpPrevents duplicate ViewContent eventID caching so Meta CAPI deduplication stays accurate!

KadiCache also includes native compatibility for 6 major wishlist plugins—keeping product grids cacheable while syncing wishlist heart icons and header counters cleanly:

  1. YITH WooCommerce Wishlist (YithWishlist.php)
  2. TI WooCommerce Wishlist (TiWishlist.php)
  3. WPC Smart Wishlist for WooCommerce (WpcWishlist.php)
  4. MoreConvert (MC) WooCommerce Wishlist (MoreconvertWishlist.php + MoreconvertNonce.php)
  5. WCBoost – Products Wishlist (WcboostWishlist.php)
  6. QODE Wishlist for WooCommerce (QodeWishlist.php)

Flash Sales, Black Friday Traffic & High-Concurrency Checkout Tips#

When running paid social drops or seasonal flash sales where 500 shoppers hit /product/* simultaneously, combine three Free Core controls for rock-solid origin stability:

  • Enable Early PHP Delivery + Soft Purge (Cache Tab): Keeps product and category pages serving in ~14 ms (0 SQL queries), while 60-second Soft Purge prevents inventory updates from causing MySQL stampedes.
  • Enable Persistent Object Cache (Object Cache Tab): Once shoppers add items to their cart and hit dynamic /cart/ and /checkout/ queries, Relay / PhpRedis / APCu + Split Alloptions cuts checkout PHP execution time by 45% to 70%.
  • Enable Content Priority (Preload Tab): Drag Products and Product Categories to the top of your Content Priority list (Sitemap Preload Guide) so revenue-generating pages warm first after every catalog update.

Frequently Asked Operational Questions

Is KadiCache 100% compatible with WooCommerce High-Performance Order Storage (HPOS / Custom Order Tables)?
Yes! KadiCache respects WooCommerce HPOS custom tables across cache invalidation, session verification, and Database Cleanup (never touching shop_order or subscription records).
What happens when the last unit of a product sells out at checkout?
KadiCache hooks WooCommerce stock-change and product-save events automatically, invalidating that product page and its related category/shop archive pages so shoppers never see an out-of-stock item marked In Stock.
Why does KadiCache have a dedicated integration for Meta for WooCommerce?
Meta for WooCommerce generates a unique server-side ViewContent eventID per pageview to deduplicate browser Pixel events against Conversions API (CAPI) events. Caching a single static eventID across 1,000 visitors would cause Meta to drop 999 events as duplicates—MetaForWooCommerce.php protects accurate event deduplication automatically!
Should I enable Keep Delaying JS for Active Shoppers?
Leave Keep Delaying JS for Shoppers enabled when using compatible themes for fast browsing even after adding items to cart, or toggle it off if a custom theme mini-cart requires immediate third-party scripts on subsequent pageviews.
Do I need to add /cart/ or /checkout/ to Excluded Paths manually—what if my checkout slug is /kasse/ or /paiement/?
No manual entry needed! PrivateCommerceRoutes.php resolves WooCommerce’s configured Cart, Checkout, and My Account page IDs dynamically across every language slug (such as /kasse/, /carrito/, or /paiement/).
Gergis — Lead Systems & Cache Architect
Principal WordPress & Cloud Edge Architect
E-E-A-T Source Verified

Creator of KadiCache’s Early PHP Drop-In, 7-Driver Object Cache Engine, Cloud Remove Unused CSS, and Zero-CLS Lazy Render pipeline.

apps/wordpress-plugin/src/Integrations/Plugins/WooCommerceSession.phpapps/wordpress-plugin/src/Integrations/Plugins/WooCommerceCartFragments.phpapps/wordpress-plugin/src/Integrations/Plugins/OfficialPaypal.phpapps/wordpress-plugin/src/Integrations/Plugins/WishlistReuse.php
Was this engineering guide helpful?