Ultimate Draft Order Cleanup Manager for WooCommerce helps store managers review and clean stale checkout drafts and eligible unpaid orders through configurable retention rules, protection rules, previews, and optional scheduled cleanup.
Installation
↑ Back to topTo start using a product from WooCommerce.com, you can use the โAdd to storeโ functionality on the order confirmation page or the My subscriptions section in your account.
- Navigate to My subscriptions.
- Find the Add to store button next to the product youโre planning to install.
- Follow the instructions on the screen, and the product will be automatically added to your store.
Alternative options and more information at:
Managing WooCommerce.com subscriptions.
Requirements
↑ Back to top- WordPress 6.2 or newer
- WooCommerce 7.0 or newer
- PHP 8.1 or newer
- An administrator or shop manager account with permission to manage WooCommerce
The extension supports High-Performance Order Storage (HPOS) and legacy WooCommerce order storage.
Quick start
↑ Back to top- In the WordPress Admin dashboard, go to
WooCommerce > Settings > Order Cleanup. - Open
Initial Setupand confirm thatRun Cleanup Automaticallyis off. - Open
Eligible Ordersand review each enabled status and retention period. - Open
Protection Rulesand add anything that must be excluded. - Open
Preview & Cleanupand selectPreview Cleanup. - Check the total, status counts, and sample orders.
- If deletion mode is selected, create an export when your retention process requires a CSV audit record.
- Execute cleanup only after the preview matches your policy.
- Enable automatic cleanup only when you are ready for scheduled runs.
How eligibility works
↑ Back to topAn order becomes eligible only when all these conditions are true:
- Its status is enabled for cleanup.
- Its age is greater than the retention period for that status.
- It does not use a protected status.
- It does not match a protection rule.
Processing, completed, and refunded orders are always protected. Checkout drafts and failed orders are enabled by default. Pending-payment, cancelled, and on-hold orders require explicit opt-in.
Configure initial setup
↑ Back to topGo to WooCommerce > Settings > Order Cleanup > Initial Setup.
Run cleanup automatically
↑ Back to topLeave this setting off while configuring and testing. When enabled, the extension creates a recurring WooCommerce Action Scheduler task.
Schedule frequency
↑ Back to topChoose a number and a unit: minutes, hours, or days. Use a schedule that gives staff enough time to review and restore recently trashed orders.
Trash-first mode and grace period
↑ Back to topMove Orders to Trash First is enabled by default. Eligible orders move to trash instead of being permanently deleted immediately. Choose a grace period from 5 to 120 minutes. The default is 30 minutes.
If an order is restored during this period, the extension cancels its pending permanent-deletion task.
Export before deleting
↑ Back to topWhen enabled, the extension creates a CSV file before deletion. Exports can include order IDs, statuses, dates, totals, customer email addresses, item counts, and note indicators.
Configure eligible orders
↑ Back to topGo to WooCommerce > Settings > Order Cleanup > Eligible Orders.
| Order status | Enabled by default | Default retention |
|---|---|---|
| Checkout draft | Yes | 24 hours |
| Pending payment | No | 7 days |
| Failed | Yes | 7 days |
| Cancelled | No | 30 days |
| On hold | No | 7 days |
Each retention period accepts minutes, hours, or days. Use values that match payment reconciliation, customer support, legal, tax, and accounting requirements for the store.
Configure protection rules
↑ Back to topGo to WooCommerce > Settings > Order Cleanup > Protection Rules. Protection rules take precedence over status and age rules.
- Specific orders: select order IDs that must never be cleaned.
- Registered customers: select customer accounts whose orders must remain untouched.
- Products and variations: exclude orders containing any selected item.
- Orders with notes: keep orders that contain customer notes.
- Orders above a total: exclude orders at or above a monetary threshold. Use
0to disable. - Payment methods: exclude orders that use selected payment methods.
Choose deletion or anonymization
↑ Back to topGo to WooCommerce > Settings > Order Cleanup > Privacy Action.
Delete eligible orders
↑ Back to topWith anonymization off, the extension follows the trash-first and grace-period settings. If trash-first mode is disabled, eligible orders can be permanently deleted during cleanup.
Anonymize eligible orders
↑ Back to topEnable Anonymize Instead of Deleting to preserve the order record while replacing selected billing and shipping fields with anonymized values. Review the result on staging before production use.
Configure notifications
↑ Back to topGo to WooCommerce > Settings > Order Cleanup > Notifications. Enable summary emails to receive a message after a scheduled run processes orders. Leave the recipient blank to use the WordPress site administrator email address.
Preview and run cleanup
↑ Back to topGo to WooCommerce > Settings > Order Cleanup > Preview & Cleanup.
Preview cleanup
↑ Back to topSelect Preview Cleanup to calculate eligible orders without changing them. Review totals, status counts, current action mode, trash behavior, and sample order details. If anything looks wrong, update settings and preview again.
Export before deletion
↑ Back to topWhen deletion mode is active and eligible orders exist, select Export Before Delete to create a CSV audit record.
Execute cleanup
↑ Back to topSelect Execute Cleanup, read the confirmation carefully, and confirm only when the displayed action is correct. Manual cleanup processes all currently eligible orders in controlled batches.
Read reports
↑ Back to topGo to WooCommerce > Settings > Order Cleanup > Reports. Reports show orders by status, eligible counts, cleanup totals, recent activity, database table sizes, and HPOS status. They do not guarantee a specific database-size or storefront-performance improvement.
Review the activity log
↑ Back to topGo to WooCommerce > Settings > Order Cleanup > Activity Log. The log records cleanup mode, processed count, successful count, failed count, duration, user, and timestamp.
Clear All Logs permanently removes every activity-log entry and cannot be undone.
Use developer tools
↑ Back to topGo to WooCommerce > Settings > Order Cleanup > Developer Tools.
Available scenarios cover empty drafts, partial customer data, zero totals, abandoned checkouts, failed payments, guest and registered customers, notes, aged orders, bot-like bursts, high-value orders, and mixed statuses.
Developer settings also include debug mode and a cleanup batch size from 10 to 500 orders.
Use WP-CLI
↑ Back to topWP-CLI commands are intended for administrators, developers, and agencies with shell access.
wp docm cleanup preview
wp docm cleanup preview --limit=50 --format=json
wp docm cleanup run --dry-run
wp docm cleanup run --batch-size=100
wp docm cleanup stats
wp docm test-orders scenarios
wp docm test-orders generate --scenario=mixed_statuses --count=10
wp docm test-orders delete
Data handling
↑ Back to topThe extension works with WooCommerce order data inside the WordPress site. It does not require an external service or API key.
- Cleanup settings in WordPress options
- Cleanup activity in a plugin-owned database table
- Action Scheduler tasks for recurring cleanup and delayed deletion
- CSV exports under the WordPress uploads directory when export is used
- Plugin metadata on orders moved to trash or anonymized by the extension
Deactivation and uninstall
↑ Back to topWhen deactivating from Plugins, choose Deactivate only to keep settings, or Remove data and deactivate to remove plugin-owned data and scheduled actions first.
Uninstalling removes plugin-owned settings, activity-log data, product settings metadata, and scheduled actions. It does not remove previously created CSV exports, restore deleted orders, or reverse completed anonymization.
Troubleshooting
↑ Back to topPreview shows no eligible orders
↑ Back to topCheck that at least one status is enabled, orders are older than its retention period, and no protection rule excludes them. Processing, completed, and refunded orders never become eligible.
Automatic cleanup is not running
↑ Back to topConfirm automatic cleanup is enabled and saved. In WooCommerce > Status > Scheduled Actions, check for pending cleanup actions. Confirm WP-Cron or the site’s server-side cron runner works.
An expected order is missing from preview
↑ Back to topCompare its status, creation date, customer, products, payment method, total, and customer notes with every protection rule.
An order moved to trash unexpectedly
↑ Back to topDo not empty trash. Restore the order during the grace period, update settings, and preview again. Restoring an order cancels its pending deletion when the extension originally moved it to trash.
Summary email did not arrive
↑ Back to topSummary email sends only after a scheduled run processes orders. Confirm notifications, recipient address, and the site’s general WordPress email delivery.
Export cannot be created
↑ Back to topConfirm the WordPress uploads directory is writable and the WordPress filesystem can create uploads/docm-exports/.
Cleanup reports failures
↑ Back to topOpen the activity log and enable debug mode temporarily. Record the extension, WooCommerce, WordPress, and PHP versions; HPOS status; action mode; and error text. Do not include customer personal data.
Frequently asked questions
↑ Back to topDoes the extension start deleting orders when it is activated?
↑ Back to topNo. Automatic cleanup is disabled by default. Review the settings, run a preview, and enable scheduled cleanup only when the result matches the store’s retention policy.
Which order statuses can it clean?
↑ Back to topIt can target checkout drafts, pending-payment orders, failed orders, cancelled orders, and on-hold orders. Checkout drafts and failed orders are enabled by default. The other eligible statuses require explicit opt-in.
Will it delete paid or completed orders?
↑ Back to topProcessing, completed, and refunded orders are always protected. You can add further protection rules for individual orders, customers, products, notes, totals, and payment methods.
Is this an abandoned-cart recovery extension?
↑ Back to topNo. It cleans eligible WooCommerce order records, including checkout drafts left by incomplete checkout sessions. It does not send abandoned-cart campaigns or replace a cart-recovery service.
Can I remove personal data without deleting the order record?
↑ Back to topYes. Anonymization mode preserves the order while replacing the selected billing and shipping fields with anonymized values.
Does it connect to an external service?
↑ Back to topNo. Cleanup runs inside WordPress and WooCommerce. The extension does not require an external account or API key.
Support request checklist
↑ Back to top- Extension version
- WooCommerce version
- WordPress version
- PHP version
- HPOS enabled or disabled
- Manual or scheduled trigger
- Delete or anonymize mode
- Relevant error text and activity-log time
- Steps to reproduce on staging, when possible
Never send order exports, customer email addresses, billing details, or other personal data unless support explicitly requests a secure transfer method.
