WooCommerce draft orders may represent checkout blocks, pending payment transitions, recovery flows, payment retries, subscriptions, admin work, or abandoned sessions. Bulk deletion can release or lose stock incorrectly, break payment callbacks, remove fraud evidence, and create duplicate customer orders.
Use this when wp-admin shows unexpected draft orders, stock appears reserved without sales, customers report duplicate checkouts, payment callbacks arrive late, or an HPOS migration exposes old draft records.
Quick answer
Export a read-only inventory of draft and checkout-draft orders with order ID, created and modified time, customer or session identity, cart hash, payment intent, stock reservation, webhook activity, HPOS rows, and scheduled cleanup. Classify active checkout, recoverable abandoned session, provider-pending payment, test order, migration residue, and unknown state. Reconcile each order with payment and stock before changing status or deleting it. Fix the cleanup owner and timeout, canary a small batch, and monitor stock plus late webhooks through the provider's maximum callback window.
Test scenarios to run
Run the same controlled fixture across these branches. Write down the expected result before testing so a surprising response is easy to identify.
| Scenario | Fixture | Expected result |
| Active checkout | Recent customer session | Preserve |
| Provider pending | Intent exists | Wait and reconcile |
| Abandoned | Expired session no payment | Release safely |
| Unknown | Missing evidence | Hold for review |
Diagnostic table
Use this table to connect the observed behavior to evidence and a verification step.
| Action | Evidence | Verification |
| Inventory without deleting | Record WooCommerce version, HPOS state, draft statuses, creation source, checkout block version, session lifetime, hold-stock setting, payment gateways, Action Scheduler state, and cleanup hooks. | Active and provider-pending orders remain intact. |
| Join stock and payment evidence | Export order ID, status, created and modified times, customer or session key, cart hash, item quantities, stock reservation, payment intent, transaction ID, webhook count, and last action. | Released stock matches only confirmed abandoned or duplicate drafts. |
| Classify every draft | Group drafts into active checkout, abandoned session, pending provider, completed elsewhere, duplicate, test, migration residue, and unknown before changing any record. | Late callbacks cannot complete deleted orders or create duplicate fulfillment. |
| Repair cleanup ownership | Compare product stock, reserved stock, order notes, payment dashboard, gateway webhooks, logs, scheduled actions, emails, and analytics for each canary order. | The scheduled cleanup runs, logs outcomes, and exposes unknown records for review. |
What to check first
- Record WooCommerce version, HPOS state, draft statuses, creation source, checkout block version, session lifetime, hold-stock setting, payment gateways, Action Scheduler state, and cleanup hooks.
- Export order ID, status, created and modified times, customer or session key, cart hash, item quantities, stock reservation, payment intent, transaction ID, webhook count, and last action.
- Group drafts into active checkout, abandoned session, pending provider, completed elsewhere, duplicate, test, migration residue, and unknown before changing any record.
- Compare product stock, reserved stock, order notes, payment dashboard, gateway webhooks, logs, scheduled actions, emails, and analytics for each canary order.
- Repair the creation or cleanup path, then process a reversible canary and observe late callbacks before expanding the batch.
Field notes
- Write the pass condition before changing anything and keep one repeatable synthetic fixture for the full test window.
- Record exact versions and UTC timestamps because deployments, caches, retries, scheduled actions, and background jobs can change the evidence.
- Test the public path and the stored server-side result, not only an admin preview, isolated command, or API response.
- Repeat verification after the relevant cache, queue, cron, webhook, and observation window has completed.
Useful command or data shape
Adapt paths, IDs, and privacy handling to the site before running commands or storing data on production.
wp wc shop_order list --status=checkout-draft --fields=id,status,date_created,date_modified --format=csv
wp action-scheduler status
wp action-scheduler list --status=pending --search=cleanup --format=table
Why this usually happens
- A checkout session expires while the payment provider continues processing.
- A callback completes one order after the customer retries into another.
- Action Scheduler is stalled, so normal cleanup never runs.
- An extension creates drafts but does not attach a stable session or payment identity.
Decision rule
Delete or transition a draft only when its customer session, stock, payment intent, callback window, duplicate relationship, and downstream records have a documented result.
Production verification checklist
- Active and provider-pending orders remain intact.
- Released stock matches only confirmed abandoned or duplicate drafts.
- Late callbacks cannot complete deleted orders or create duplicate fulfillment.
- The scheduled cleanup runs, logs outcomes, and exposes unknown records for review.
Safe fix order
Use a sequence that makes each result easy to prove. Stop when new evidence changes the scope or owner of the problem.
- Inventory without deleting
- Join stock and payment evidence
- Classify every draft
- Repair cleanup ownership
- Canary and monitor late callbacks
Mistakes to avoid
- Changing production before recording exact plugin versions, UTC timestamps, a stable fixture, the expected result, and a tested rollback point.
- Treating one successful screen as proof while stored records, logs, queues, caches, emails, APIs, and downstream systems remain unchecked.
- Testing only as an administrator instead of using the role, device, locale, cache state, payment state, and failure branch that customers reach.
- Leaving temporary exclusions, debug output, test accounts, broad permissions, or one-off repair code active after verification.
Questions teams ask during testing
Can I run this directly in production?
Begin with read-only evidence and use staging for package, database, checkout, form, permission, or security changes. If a production canary is necessary, make it identifiable, reversible, monitored, and unable to expose personal data or charge a customer.
How do I avoid a false positive?
Repeat the same fixture with the same versions, role, URL, locale, cache state, and integrations. Compare browser, stored, API, and log evidence instead of relying on one screen.
What should the evidence packet contain?
Keep UTC time, exact versions, synthetic record ID, expected result, actual result, relevant log lines, change made, rollback point, owner, and final verification. Redact secrets and personal data.
When is the test complete?
Close the work when the primary path passes, failure branches are understood, stored and downstream records reconcile, temporary changes are removed, and monitoring covers the next update.
What to tell the client or owner
Give the owner a concise packet with the affected workflow, exact versions, UTC test time, fixture ID, expected result, actual result, key logs, change made, rollback point, final result, unresolved risks, owner, and next review date. Remove credentials and personal data before sharing it.
When HandL WP should help
Bring in help when this affects leads, checkout, search visibility, security, paid media reporting, or a client production site. HandL WP can trace the issue through WordPress, hosting, cache, tracking, and Search Console, then verify the workflow after the technical fix.
If this is active on a production site, have HandL WP reconcile WooCommerce draft orders.
Related HandL WP guides
Use these related guides when the same issue touches tracking, security, checkout, or crawler visibility.
Helpful references