Ultimate Draft Order Cleanup Manager

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 top

To 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.

  1. Navigate to My subscriptions.
  2. Find the Add to store button next to the product youโ€™re planning to install.
  3. 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
  1. In the WordPress Admin dashboard, go to WooCommerce > Settings > Order Cleanup.
  2. Open Initial Setup and confirm that Run Cleanup Automatically is off.
  3. Open Eligible Orders and review each enabled status and retention period.
  4. Open Protection Rules and add anything that must be excluded.
  5. Open Preview & Cleanup and select Preview Cleanup.
  6. Check the total, status counts, and sample orders.
  7. If deletion mode is selected, create an export when your retention process requires a CSV audit record.
  8. Execute cleanup only after the preview matches your policy.
  9. Enable automatic cleanup only when you are ready for scheduled runs.
Test the complete workflow on staging before enabling scheduled cleanup on a live store.

How eligibility works

↑ Back to top

An 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 top

Go to WooCommerce > Settings > Order Cleanup > Initial Setup.

Run cleanup automatically

↑ Back to top

Leave this setting off while configuring and testing. When enabled, the extension creates a recurring WooCommerce Action Scheduler task.

Schedule frequency

↑ Back to top

Choose 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 top

Move 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 top

When 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.

Treat exported CSV files as personal data. Restrict access, follow the store’s retention policy, and remove exports when they are no longer needed.

Configure eligible orders

↑ Back to top

Go to WooCommerce > Settings > Order Cleanup > Eligible Orders.

Order statusEnabled by defaultDefault retention
Checkout draftYes24 hours
Pending paymentNo7 days
FailedYes7 days
CancelledNo30 days
On holdNo7 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 top

Go 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 0 to disable.
  • Payment methods: exclude orders that use selected payment methods.

Choose deletion or anonymization

↑ Back to top

Go to WooCommerce > Settings > Order Cleanup > Privacy Action.

Delete eligible orders

↑ Back to top

With 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 top

Enable 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.

Deletion and anonymization can affect support, refunds, reporting, tax records, and legal retention duties. Confirm the store’s policy before running cleanup.

Configure notifications

↑ Back to top

Go 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 top

Go to WooCommerce > Settings > Order Cleanup > Preview & Cleanup.

Preview cleanup

↑ Back to top

Select 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 top

When deletion mode is active and eligible orders exist, select Export Before Delete to create a CSV audit record.

Execute cleanup

↑ Back to top

Select 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 top

Go 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 top

Go 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 top

Go to WooCommerce > Settings > Order Cleanup > Developer Tools.

Use test-order tools on staging or development sites. Do not generate disposable test orders on a live store.

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 top

WP-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 top

The 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 top

When 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 top

Preview shows no eligible orders

↑ Back to top

Check 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 top

Confirm 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 top

Compare its status, creation date, customer, products, payment method, total, and customer notes with every protection rule.

An order moved to trash unexpectedly

↑ Back to top

Do 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 top

Summary 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 top

Confirm the WordPress uploads directory is writable and the WordPress filesystem can create uploads/docm-exports/.

Cleanup reports failures

↑ Back to top

Open 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 top

Does the extension start deleting orders when it is activated?

↑ Back to top

No. 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 top

It 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 top

Processing, 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 top

No. 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 top

Yes. 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 top

No. 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.

Related Products

Offer add-ons like gift wrapping, special messages or other special options for your products.

WooCommerce Subscriptions is a WooCommerce extension that lets customers subscribe to your products or...

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.