Managing customer carts and session data is a routine part of running a WooCommerce store, but it is one that most store owners handle poorly or not at all. WooCommerce stores session records for every visitor, retaining cart contents and activity data for 48 hours by default. For a store with moderate to high traffic, that default behaviour leads to database bloat, potential inventory inaccuracies, and a checkout experience that can slow down as the sessions table grows.
The Clear Cart and Sessions for WooCommerce plugin gives store owners direct control over session management. This guide covers everything the plugin does, how to configure it, and which settings make sense for different types of stores.
What the Plugin Does
At its core, the plugin automates the process of clearing WooCommerce carts and sessions after a defined period of inactivity. Instead of relying on WooCommerce’s default 48-hour retention window, you choose how long inactive sessions are kept before they are cleared. This keeps your database lean, releases reserved inventory back into stock, and gives you control over cart behaviour in ways that WooCommerce does not provide out of the box.
Beyond automated clearing, the plugin also adds customer-facing features: an empty cart button, a save cart option, and a share cart feature. Each of these addresses a different aspect of cart management that standard WooCommerce handles only partially.
Automated Session Clearing
The most important feature is the automated clearing schedule. Navigate to WooCommerce > Settings > Clear Cart and Session after installation and set the inactivity duration. You can define the threshold in minutes, hours, or days depending on your store’s typical customer behaviour.
The plugin checks that a session is genuinely inactive before clearing it. A customer who is actively browsing or has the cart open will not have their session removed mid-activity. Only sessions that have been idle for the full configured duration are cleared. This prevents the plugin from interfering with active customers while still keeping the database free of stale records.
Choosing the right threshold matters. For stores selling low-consideration products where customers decide quickly, two to four hours is a reasonable window. For stores selling products that require more research and comparison, customers might return a day or two later with genuine intent to purchase. In those cases, a longer threshold of 24 to 48 hours makes more sense. The plugin gives you the flexibility to set whichever duration fits your store’s conversion patterns.
The Empty Cart Button
Standard WooCommerce gives customers the ability to remove items from their cart one at a time. There is no native option to clear the entire cart in a single action. For customers who have accumulated a cart they want to discard entirely and start over, removing items individually is an unnecessary friction point.
Clear Cart and Sessions for WooCommerce adds a one-click empty cart button to the cart page. The button label and colour are both customisable, so you can align the button with your store’s design rather than inserting a generic-looking control that stands out for the wrong reasons.
After clearing the cart, customers can be redirected to the shop page or any custom URL of your choosing. This redirect is worth configuring thoughtfully. Sending a customer who has just cleared their cart back to the shop homepage or a category page with relevant products keeps them in your store and gives them a natural starting point for a fresh browsing session. Sending them to a blank cart page or leaving them where they are provides no next step and makes it more likely they leave the site.
Save Cart for Later
The save cart feature allows customers to preserve their current cart contents without completing a purchase. Saved carts are stored in the customer’s account and can be restored or deleted from their account dashboard at any time.
This feature is particularly useful for customers who are price-comparing across multiple stores, waiting for payday, or building a cart they intend to return to. Without a save cart option, these customers have two choices: complete the purchase now or lose their cart when the session expires. A save cart feature gives them a third option that keeps their selections associated with your store rather than a competitor’s.
From a store management perspective, saved carts are also easier to work with than abandoned session records because they are attached to a customer account rather than sitting in the sessions table as anonymous data.
Share Cart
The share cart feature lets customers share their current cart contents through social media platforms including Facebook, LinkedIn, and Instagram, or via a direct URL. Customers can click the share button from the cart page and distribute their selection to friends, family, or social followers.
For stores with gift registries, group purchases, or products that customers frequently recommend to others, this turns the cart page into a lightweight sharing tool. A customer who shares a cart full of products they like is effectively driving traffic to your store from their own network without any advertising spend on your part.
Shortcode Placement
The plugin includes shortcodes for the clear cart, save cart, and share cart buttons. These shortcodes let you place the buttons anywhere on your store without modifying theme files or writing custom code. A clear cart button on a product page, a save cart button on a landing page, or a share cart button embedded in a sidebar are all achievable by pasting a shortcode into the relevant page editor.
The full documentation covers the available shortcodes and their parameters. For stores using Elementor or Bakery, the shortcodes can be inserted through the relevant text or shortcode block without any additional configuration.
Clear Cart on Page Load
The plugin also includes an option to clear the cart automatically when a page loads. This is useful for stores that use custom landing pages or promotional pages where arriving customers should start with a fresh cart regardless of what they had previously selected. Enabling this option on a specific page ensures every visitor to that page begins their session without previous cart contents carried over.
Compatibility
The plugin is compatible with HPOS, Multisite, and PHP 8. It works with Storefront, Avada, Flatsome, Porto, Woodmart, Divi, and the WooCommerce default theme, and integrates with Elementor and Bakery page builders. It functions correctly across mobile layouts and major browsers.
Summary
The Clear Cart and Sessions plugin addresses a set of WooCommerce limitations that affect store performance, inventory accuracy, and the customer experience around cart management. Automated session clearing prevents database bloat and keeps inventory accurate. The empty cart button removes friction for customers who want to start fresh. Save cart and share cart extend the usefulness of the cart page beyond its default function. Shortcode support gives store owners flexibility in placing these features where they are most needed. For stores with consistent traffic, this combination of features handles a category of store management that WooCommerce leaves largely unaddressed by default.

