Sign inBlogSupportContact
WooCommerce

Filter WooCommerce orders by status, total, customer, or product

Every pending order over $500. Every order from a specific email. Every order containing product X last month. Find them, act on them, inside a macro.

5 min read May 2026 filter order

The Orders admin list gives you one filter at a time

You need the intersection: pending orders over $500 from the last 30 days that include a specific product. WooCommerce's built-in Orders list lets you filter by status, or by date, or by customer — one at a time. You can't combine.

For automation — "follow up on every high-value pending order", "refund everyone who bought a defective product last week" — you need programmatic querying. That means custom wc_get_orders calls, which means PHP, which means a developer.

What most people do instead

Export orders to CSV, filter in ExcelData is stale the moment you export. No way to trigger follow-up actions from the CSV.
Write custom wc_get_orders PHPRequires developer. One-off snippets. Hard to iterate on filter criteria.
Install an advanced-filter pluginAdds a new admin page. Its filters never quite match what you need.

A better way: combine filters, pipe into macros

Run filter order with any combination of filters — status, total range, date range, email, product, customer role. Results include full order details (number, total, status, email, line items) and feed directly into a macro's for_each loop for bulk actions.

TrueCommander
Filter order
8 orders match
8
Matches
$6,420
Total value
avg $803
Per order
Order #1247 · $890 · john@example.compending
Order #1238 · $742 · maria@example.compending
Order #1231 · $1,240 · carlos@example.compending

Relative date phrases just work. Pass -date_from="7 days ago" or -date_to="yesterday". No YYYY-MM-DD juggling. Perfect for scheduled macros that run "every Monday, find pending orders from the past week."

How it works

The command calls wc_get_orders with a query built from your parameters, then returns each matching order's full context — number, total, status, customer email, line items, dates. Default limit is 200. Pass -limit=-1 for unbounded.

1
Choose your filtersStatus, total range, date range, customer email, product ID, role — combine any number
2
Get a list of matching ordersEach result contains full order details available to the next macro step
3
Loop with for_each for bulk actionsSend an email per order. Apply a refund per order. Update status per order.
ParameterValue
-statuspending, processing, completed, on-hold, cancelled, refunded, failed
-total_min / -total_maxOrder total range (e.g., -total_min=100)
-date_from / -date_toAbsolute dates or phrases like "7 days ago", "today"
-emailCustomer email (exact match)
-product_idFind orders containing a specific product
-limitDefault 200. -1 for unlimited.
Can be used in

Real example

Your store has a 3-day abandoned-checkout rule: if an order stays pending for 72 hours, send a follow-up email, then cancel after 7 days with a refund.

You build two scheduled macros. The first runs daily: filter order -status=pending -date_to="3 days ago" -date_from="7 days ago", then for each result, send a template email reminding the customer. The second runs weekly: filter order -status=pending -date_to="7 days ago", then for each result, cancel the order and post a message to Slack.

The rule runs itself. You stop micromanaging the pending queue.

Goes further with TrueCommander

Ready?

Query your orders like a database.

This is one of 91 commands. All included with every license.

Cookies. The short version.

Essential cookies keep the cart and theme working. Analytics only fire if you say yes. Read our policy.