Answering "how much did we make last month?" is slow
You need the number for Monday's meeting. You open WooCommerce Analytics. You pick a date range from the dropdown. The chart refreshes. You scroll past tables and graphs you don't need. Finally you find the single revenue number.
Worse, next week you want the same number for the week-before-last. Repeat the ritual.
What most people do instead
A better way: type a date phrase, get the answer
Run revenue with a date range. Absolute dates (-from=2026-01-01 -to=2026-03-31) or relative phrases (-from="7 days ago" -to=today). Get net, gross, refunds, order count — same format as revenue today.
Relative phrases unlock automation. A scheduled macro can run revenue -from="7 days ago" -to=today every Monday. The "last 7 days" automatically means the correct 7 days at execution time — no need to compute dates in the macro.
How it works
The command parses the date range (relative or absolute), queries WooCommerce for completed + processing orders in that window, deducts refunds, and returns the same breakdown as revenue today. Results use WooCommerce's internal revenue logic so numbers match the Analytics page.
-from and -to. Accepts absolute dates or phrases like "yesterday", "30 days ago".| Parameter | Value |
|---|---|
-from | Start date (YYYY-MM-DD) or phrase ("7 days ago", "start of month") |
-to | End date (YYYY-MM-DD) or phrase ("today", "yesterday", "end of month") |
| Scope | Completed + processing orders. Refunds deducted. |
| Returns | Net, gross, refunded, order count, average order value |
| Can be used in |
Real example
Monday morning standup. The team wants last-week numbers versus the week before. Without standing up from your desk, you type:
revenue -from="14 days ago" -to="7 days ago" → $22,100 · 142 orders
revenue -from="7 days ago" -to=today → $28,420 · 167 orders
Week-over-week growth: +28.6%. Done. You had the numbers before the first coffee arrived.
A weekly macro now runs every Monday at 8am: revenue for last week → send template email to the team with the numbers and a week-over-week percentage. The standup becomes "here's what the email showed" instead of "let me pull that up."