Your customer list is a flat table. You need segments.
Marketing wants "everyone who's made 3+ purchases this year." Legal wants "every German user so we can send the GDPR compliance email." Support wants "every customer who bought the recalled product." WordPress gives you a flat Users page sorted by registration date. Segmentation means exporting and filtering manually.
Worse, you can't act on those segments without another round of work: copy email addresses into a campaign tool, run a SQL query, re-export after every change.
What most people do instead
A better way: WordPress + WooCommerce filters in one command
Run filter user with WordPress criteria (role, registration date) and WooCommerce criteria (spend total, order count, country). Each matching user comes with their purchase history, profile meta, and role. Pipe into macros for bulk email, tagging, or CSV export.
WooCommerce purchase history included. Each matching user comes with total spend, order count, and last purchase date — fields you can reference in the next macro step as {{step1.total_spend}}, {{step1.last_order_date}}, etc.
How it works
The command builds a WP_User_Query for WordPress-native filters (role, registration date, capability), then joins WooCommerce order data for spend-based filters. Results include full user details plus aggregated purchase history.
| Parameter | Value |
|---|---|
-role | WordPress role: customer, subscriber, editor, etc. |
-registered_from / -registered_to | Registration date range |
-country | WooCommerce billing country (ISO code: DE, US, GB) |
-spend_min / -spend_max | Total spend threshold (WooCommerce only) |
-orders_min | Minimum number of orders |
-bought_product | Users who purchased a specific product ID |
| Can be used in |
Real example
You're launching a VIP loyalty program for customers who've spent over $1,000 lifetime. You need to email them an invite, tag them in your database, and push them to your CRM.
Macro step 1: filter user -role=customer -spend_min=1000. Result: 87 users. Step 2 with for_each: for each user, send a template email with their name, total spend, and a unique discount code. Step 3 with for_each: update user meta with vip_tier=gold. Step 4 with for_each: call the HubSpot API to tag them as "VIP-Gold".
One macro run. Three actions per user. Eighty-seven VIPs enrolled in four minutes.