Your prompt

Make sure my cart, checkout and My Account pages, plus the WooCommerce session cookies, are excluded from page caching. Then test adding to cart while logged out.

What this prompt does

Cart and checkout content is different for every visitor. If a page cache stores it, customers can be shown stale or even someone else’s content. This prompt asks your assistant to make sure those pages, plus My Account and the WooCommerce session cookies, are excluded from caching.

It then adds a product to the cart while logged out to confirm the cart behaves. WooCommerce commonly uses cookies with names beginning wp_woocommerce_session_ plus woocommerce_items_in_cart and woocommerce_cart_hash, and your cache needs to leave visitors who carry them alone.

Different caching tools handle this differently. Some detect WooCommerce and exclude the right pages by themselves, while others need rules added by hand. Your assistant should tell you which applies rather than adding duplicate rules.

Before you run it

You are changing cache settings, which can affect the whole site.

  • Know which caching plugin or host level cache you use.
  • Ask your assistant to check first, since some hosts and plugins already exclude WooCommerce pages automatically.
  • Note your current settings so you can put them back.
  • Plan to clear the cache after the change.
  • If you use a CDN or a host level cache as well as a plugin, ask about every layer, because an exclusion in one does not carry over to another.

What to check afterwards

  • Open a private window, add a product and confirm the cart shows it.
  • Reload the cart and see that it persists.
  • Log in and out and make sure no account details appear for other visitors.
  • Check the exclusion list for the right pages and cookies.
  • Confirm that clicking Add to cart from a product page also updates the mini cart if your theme has one.

Ways to adapt it

  • Include more pages: Also exclude any membership or booking pages.
  • Report only: List the current exclusions but do not change them.
  • Test further: Repeat the test in two different browsers.

If it goes wrong

  • The cart appears empty. A cached page is being served. Purge the cache and recheck the exclusions.
  • Your cache tool has no such setting. Use your host’s cache settings or a different plugin.
  • Pages feel slower. Excluded pages are not cached, so some slowdown is expected. Keep product pages cached.

For more background, read our guide to caching plugins compared and WooCommerce speed checklist, or work through the speed-up tutorial.

← Every prompt on WPMusk

SponsoredNibWP

Stop clicking. Start telling.

Ask your AI to build pages, fix speed and nail SEO, and NibWP does it on your WordPress site in minutes.

Try NibWP.com

Get the WPMusk Sunday brief

One email a week with our newest tutorials, honest tool reviews and resources you won’t find on the blog. No spam, unsubscribe in one click.

Newsletter (Sunday brief)