Description
CartFlush helps you automatically clear inactive WooCommerce carts, keeping your store clean, fast, and optimized.
Instead of relying on a single timeout, CartFlush gives you full control over cart expiration from one settings screen under WooCommerce. You can define different timeout rules based on customer type, user roles, products, categories, and tags, then add exclusions for carts that should never be cleared automatically.
Whether you want faster cart turnover, better session management, or cleaner abandoned cart handling, CartFlush gives you the tools to do it properly.
Live Demo
Try Live Demo (No Setup Required)
Why Use CartFlush?
- Prevent stale and abandoned carts from piling up
- Improve WooCommerce session performance
- Apply smarter rules based on customers and products
- Manage rules visually from the WooCommerce settings page
- Import or export rules for fast setup and migration
Key Features
Default Cart Timeout
Set a global inactivity timeout in minutes. If no other rules apply, this value determines when a cart is cleared.
Visual Rule Builder
Create and edit cart timeout rules directly from the CartFlush settings page under WooCommerce. No CSV import is required for day-to-day management.
Customer Type Rules
Define separate timeouts for:
- Guest customers
- Logged-in customers
Role-Based Timeout Rules
Define custom cart expiration times for specific user roles.
Examples:
- Customers – 30 minutes
- Subscribers – 60 minutes
- Wholesale users – 120 minutes
Product, Category, and Tag Rules
Apply specific timeout values based on:
- Product ID
- Product category
- Product tag
This makes it easy to create shorter or longer expiration windows for special items, campaigns, or collections.
Smart Timeout Logic
When multiple timeout rules apply, CartFlush automatically uses the shortest valid timeout.
Exclusion Rules
Prevent cart clearing entirely for matching carts using:
- Excluded roles
- Excluded products
- Excluded categories
- Excluded tags
CSV Import for Bulk Rules
Bulk import rule data with CSV when that is faster than manual entry.
Supported CSV types:
- customer_type
- role
- product_rule
- category
- tag
- excluded_role
- excluded_product
- excluded_category
- excluded_tag
CartFlush also includes a downloadable sample CSV from the settings page to help merchants get started faster.
JSON Import and Export
Export the full CartFlush configuration as JSON for backup or migration, then import it on another store when needed.
WooCommerce Menu Integration
The CartFlush settings page is available directly under the WooCommerce admin menu for quicker access.
Duplicate Rule Warnings
CartFlush warns admins when duplicate rules are saved so they can clean up overlapping entries more easily.
Lightweight and Efficient
CartFlush focuses only on inactivity tracking, rule evaluation, and cart clearing without adding unnecessary overhead.
Translation Ready
Includes the cartflush text domain for localization.
Clean Uninstall
When the plugin is deleted, CartFlush removes its stored settings automatically.
How It Works
- A customer adds items to the cart.
- The inactivity timer begins.
- CartFlush checks the default timeout and any matching timeout rules.
- The shortest valid timeout is selected.
- If an exclusion rule matches, cart clearing is skipped.
- The cart is cleared after the final timeout is reached.
Supported Import Formats
CSV headers:
type,key,timeout_minutes
Supported types:
- customer_type
- role
- product_rule
- category
- tag
- excluded_role
- excluded_product
- excluded_category
- excluded_tag
Example rows:
customer_type,guest,20
role,customer,30
product_rule,321,10
category,flash-sale,15
tag,seasonal,25
excluded_role,wholesale_customer,
excluded_product,123,
excluded_category,high-ticket,
excluded_tag,fragile,<h3>Does this work for guest users and logged-in users?</h3>
Yes. CartFlush uses WooCommerce sessions, so both are supported.
How is the timeout calculated?
The plugin starts with the default timeout, then checks matching customer type, role, product, category, and tag rules. The shortest valid timeout is applied.
What if a cart contains excluded items?
CartFlush skips clearing the cart entirely.
Can I manage rules without importing CSV?
Yes. Rules can be added and edited directly from the CartFlush settings page.
Can I migrate settings between sites?
Yes. Export settings as JSON and import them on another site.
Does uninstall remove all data?
Yes. All plugin options are deleted during uninstall.
Screenshots
Reviews
Contributors & Developers
“CartFlush – Auto Clear WooCommerce Cart for Inactive Users” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “CartFlush – Auto Clear WooCommerce Cart for Inactive Users” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
2.3.1
- Refactored the settings page save flow to use the default WordPress settings method
- Simplified rule editing with text-based rule groups for timeout and exclusion settings
- Improved settings page structure and admin styling for a cleaner editing experience
- Kept CSV and JSON import/export tools available from the admin page
2.3.0
- Refined the free version feature set around core timeout and exclusion rules
- Improved the WooCommerce settings experience and release documentation
- Preserved the manual rule builder plus basic CSV and JSON migration tools
2.2.0
- Added cart value timeout rules for subtotal-based cart expiration
- Added product-level timeout overrides in the product editor
- Added optional pre-clear warning notices for expiring carts
- Expanded CSV import with cart value ranges and downloadable sample templates
- Added duplicate rule detection warnings in admin
2.1.0
- Added a full visual rule builder to the settings page
- Moved the plugin page under the WooCommerce admin menu
- Added customer type, product, and tag timeout rules
- Added excluded role and excluded tag support
- Expanded CSV import to support all new rule types
- Redesigned the admin settings interface with a more modern layout
- Improved import/export presentation and rule card usability
2.0.0
- Added JSON import/export system
- Added CSV rule import support
- Added role-based timeout rules
- Added category-based timeout rules
- Added product and category exclusions
- Improved admin UI with modern layout
- Added uninstall cleanup
- Added localization support
- Refactored plugin structure
1.0.0
- Initial release




