Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Session timeout during checkout without warning: how to fix it

PRF-250Medium impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

A session is how a website remembers a visitor between pages: their cart, login and form progress. It is usually held by a cookie and a server record that expires after a set time of inactivity or a fixed time since it began.

A session timeout without warning happens when that time runs out while someone is mid-checkout. The next click gives an error such as "Your session has expired", a blank page, a login screen, or a cart that is suddenly empty. Nothing told the shopper it was coming.

Common causes: a short session lifetime set in the platform or server, a security setting on payment pages, a cached page holding an old security token (nonce), a cart reservation that expires, or a cookie that is dropped when the browser is backgrounded on mobile.

Why it costs you leads or sales

Checkout is the last step before revenue. Real people get interrupted: a phone call, a search for their card, a check of a delivery date. If they return after the timeout and everything is gone, many will not start again.

It also hurts trust. A sudden error on a payment page makes people wonder whether they were charged or whether the site is safe. Paid traffic is wasted too, because you paid for the click that ended at the empty cart.

Where a silent timeout breaks the journey
  1. Add to cartCart saved in the session
  2. Start checkoutDetails partly filled in
  3. Shopper is interruptedSession expires with no notice
  4. Click PayError or empty cart
  5. Order confirmedPurchase never tracked

The shopper is interrupted, comes back, and the session has ended without any warning.

Checkout completion by time away from the pageExample numbers
Checkout completion by time away from the page (example)Back in 2 min: 80 % completing; Back in 20 min: 60 % completing; Back in 60 min (expired): 20 % completing03161806020Back in 2 minBack in 20 minBack in 60 min (expir…% completing

Example: illustrative numbers only. The longer the gap, the more likely the session has expired and the shopper gives up.

How to check if your site has it

Test your checkout timeout by hand
  1. Start a real checkout

    Add a product to the cart, go to checkout and fill in the contact and shipping details. Stop before paying.

  2. Wait and leave the tab idle

    Leave it for 15, 30 and 60 minutes in separate tests. Try on a phone too, switching to another app in between.

  3. Come back and continue

    Click the next button. Note whether you get an error, an empty cart, a login screen or lost form fields.

  4. Look for warnings

    Did any message appear before it expired? A countdown or a prompt to extend counts as a warning.

  5. Check the cookie lifetime

    In Chrome DevTools open Application, then Cookies. Look at the Expires/Max-Age value of the session and cart cookies.

  6. Check your support inbox

    Search for messages like "my cart disappeared" or "session expired", and look for checkout steps with high exits in your analytics.

How to fix it

The fix has four parts: make the session last longer, warn before it ends, save progress so nothing is lost, and recover gracefully if it does end. Where you can change settings depends on your platform.

Lengthen the session and avoid stale pages
  1. Exclude checkout from page cache

    In your caching plugin, exclude the cart, checkout and account pages. Cached pages can carry an expired security token (nonce) that causes errors.

  2. Lengthen the WooCommerce session

    WooCommerce sessions last 48 hours by default. If yours is shorter, a plugin or a wc_session_expiration filter is probably overriding it. Add the snippet below to a child theme or code snippets plugin to set it.

  3. Check security plugins

    Some security or membership plugins set an idle logout. Raise or disable it for customers.

WooCommerce: set the session length to 3 daysphp
add_filter( 'wc_session_expiration', function () {
    return 3 * DAY_IN_SECONDS;
} );
Warn people and keep their progress
  1. Show a warning before expiry

    If your system has a hard limit (for example a stock hold), show a visible countdown or a message such as "Your cart is held for 10 more minutes" with a button to extend it.

  2. Save form data as people type

    Keep contact and address fields in the server, or in sessionStorage, so a reload or new session restores them.

  3. Use a clear expired message

    If the session ends, say so in plain words, keep the cart and send the shopper back to the step they were on. Avoid a blank page or a generic error.

  4. Add guest cart recovery

    Capture the email early in checkout and send a link that restores the cart.

What the shopper sees after an idle break

Before

  • No warning as time runs out
  • Click Pay gives a generic error
  • Cart is empty and details are gone

After

  • Longer session and a clear hold notice
  • Expired message explains what happened
  • Cart and fields restored, one click to continue

How to confirm it's fixed

Confirmation checks
  • Fill in checkout, wait past the old timeout, then continue: no error appears
  • If a hold time exists, a warning shows before it ends
  • The cart and typed details are still there after a reload
  • An expired session shows a clear message and returns the shopper to checkout
  • The test also passes on a phone after switching apps
  • The cart and checkout pages are excluded from caching

How to prevent it happening again

Prevention
  • Re-run the idle test after plugin, theme, caching or hosting changes
  • Record the session lifetime in your launch checklist
  • Review checkout exits and support emails each month for session errors
  • Keep abandoned cart emails active
  • Test on mobile as well as desktop

How FunnelGuard handles this

FunnelGuard does not check for session timeouts during checkout yet. It is a possible future check. A robot visitor runs a journey quickly and does not wait through a long idle gap, so a slow expiry would not show up in a normal run.

What FunnelGuard does catch nearby: it runs your real checkout journey on a schedule from the EU or the US, checks each step and the tracking hits sent to GA4, Google Ads, Meta and other platforms, and re-checks a failure from a second region before sending one alert with a screenshot and a likely cause. If a broken cart or checkout step stops the journey, that kind of failure can be seen. It stops before payment unless the store's test mode is set up.

To watch for timeouts today, repeat the manual idle test above after every release, search support mail for session errors, and watch checkout drop-off in your analytics. The free plan (1 site, 2 journeys, daily checks, no card) covers the basics of your checkout journey, and a free read-only website audit is also available.

Questions people ask

Why does my checkout say the session has expired?

The server ended the visitor's session after a set period of inactivity or a fixed lifetime, or a cached page held an out-of-date security token. Check your platform's session setting, exclude checkout pages from caching and look for plugins that log users out.

How long should a checkout session last?

Long enough for a normal interruption, typically several hours of inactivity for the cart and checkout. Keep the cart saved for days, and only shorten the time on pages showing personal or payment data.

Why is my cart empty when I come back to checkout?

The cart was tied to a session or cookie that expired or was cleared. Store the cart server-side or against an account, extend the cookie lifetime and use cart recovery emails.

How do I warn customers before their checkout session ends?

Show a message or countdown when a hold is about to end, with a button to extend it. Also save their form data so nothing is lost if it does expire.

How do I fix the WooCommerce session expiring too fast?

Exclude the cart and checkout pages from caching, then set the session length with the wc_session_expiration filter. Also check security and membership plugins for idle logout settings.

Can I change the checkout session time on Shopify?

No, Shopify manages checkout sessions itself. You can remove apps or scripts that clear the cart and turn on abandoned checkout emails so shoppers can resume.

Does FunnelGuard detect checkout session timeouts?

No. It is not a check FunnelGuard offers yet and may be added in future. It does run your checkout journey on a schedule and alerts you if a step breaks, but you should test idle timeouts by hand.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.