# WooCommerce: Sorry, your session has expired. Return to shop

**Code:** `Sorry, your session has expired` · **Category:** WordPress · **Seen on:** WordPress

WooCommerce lost the customer’s cart session — usually because checkout/cart pages are cached or cookies are blocked/stripped.

## Meaning

Cart, checkout and My Account must never be cached. CDNs/page caches that strip cookies or serve cached pages, and session cleanup issues, cause empty carts and this message.

## Common causes

- Cart/checkout pages cached (page cache/CDN)
- CDN stripping woocommerce cookies
- Mixed domain (www/non-www) cookies
- Session table cleaned prematurely

## Quick fix

1. Exclude cart, checkout and my-account from all caching
2. Bypass cache when woocommerce_items_in_cart cookie is set
3. Keep one canonical domain

## Detailed fix by platform

### Nginx

1. `if ($http_cookie ~* "woocommerce_items_in_cart|wp_woocommerce_session_") { set $skip_cache 1; }`

## How to diagnose

1. **Cache** — Checkout cached? (response headers)
2. **Cookies** — Set and returned?
3. **Domain** — Consistent?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/wordpress/woocommerce-session-expired)
