Segmenting users is always messier than it should be
You need to target a specific slice of your users: the customers who bought a particular product, the subscribers who upgraded last quarter, the beta testers you invited manually. WordPress gives you roles and nothing else. Roles are global. You can't add a role called "vip" without it appearing in the role dropdown everywhere, and you certainly can't assign three different "vip"-style labels to the same user without a plugin that ships an entire membership system.
So those labels end up in spreadsheets, in WooCommerce order notes, or nowhere at all, disconnected from the user record where your automations could actually read them.
What most people do
vip inside vip-trial quietly corrupts your logic.A better way: each tag is its own clean user_meta row
TrueCommander stores each tag as its own user_meta row with the key trc_user_tag, properly indexed rather than crammed into a comma-separated blob you have to read and rewrite by hand. Type assign user tag to attach a label and remove user tag to detach it, both idempotent so running them twice inside a scheduled macro changes nothing the second time. To read a user's labels back, get user meta with a trc_user_tag filter returns them for that user.
trc_user_tagShown in advanced mode, where commands start with tp. In easy mode you type the same command without the tp prefix.
Clean, durable storage. Each tag is its own indexed user_meta row keyed trc_user_tag, not a comma-separated blob, so labels stay easy to add, remove, and read individually, and they uninstall cleanly with the plugin. Read a user's labels back any time with get user meta.
What each command does
Two commands, one job: attach and detach slug labels from user records cleanly and safely.
| Command | What it does |
|---|---|
assign user tag | Attaches a slug tag to a user by adding an individual trc_user_tag user_meta row. Idempotent: if the tag already exists, the command returns success without duplicating the row. |
remove user tag | Detaches a slug tag from a user. Pass -all=true to remove every tag from the user in one call. Idempotent: removing a tag the user does not have returns not_tagged without an error. |
How it works
assign user tag Supply a slug and a user ID. The slug is normalized to lowercase, spaces become hyphens, and characters outside [a-z0-9_-] are dropped. Each tag becomes its own indexed user_meta row.get user meta Run get user meta -filter=trc_user_tag for a user to see their labels, then branch a macro on the result so a tagged user gets different handling than an untagged one.remove user tag Pass -tag to detach one label, or pass -all=true to wipe every tag from the user in a single call. Safe to run on a schedule: missing tags are skipped, not errored.| Detail | Value |
|---|---|
| Command names | assign user tag, remove user tag |
| Tag format | Slug: lowercase, hyphens for spaces, [a-z0-9_-] only, 1 to 100 characters |
| Storage | Individual user_meta rows, meta_key trc_user_tag, one row per tag per user |
| Idempotency | Assign is a no-op if the tag exists. Remove returns not_tagged if the tag is absent. Neither throws an error. |
| Bulk usage | Chain filter user (by role, spend, registration, or orders) into a Repeat step and call assign user tag with {{item.id}} to label a whole set in one macro run |
| Can be used in |
Real example
Tags earn their keep for signals you cannot compute from a filter: a customer your support team flagged as "priority", a user you invited to a private beta, a lead from an event. Role and spend will never tell you those, so you set them explicitly: tp assign user tag -tag=priority -user_id=123.
For labels you can compute, set them in bulk. Build a macro that runs filter user -spent-above=500 to return your high spenders, then a Repeat step that calls tp assign user tag -tag=vip -user_id={{item.id}} for each one. Schedule it nightly so the label keeps up as customers cross the threshold.
Then read the labels where it matters. A macro that handles a checkout or a support request runs get user meta -filter=trc_user_tag for that user and branches on the result, so a priority or vip user gets faster handling, a bonus, or a different message. The label lives on the user record, set deliberately and read back in context.
Goes further with TrueCommander
filter user (by role, spend, or registration) into a Repeat step and call assign user tag with {{item.id}}. Label hundreds of users from one click without writing any code.trc_user_tag with get user meta and branch the macro, so a tagged user gets a different path, a discount, a message, or priority handling, than an untagged one.vip stay current as customers cross a threshold. Tags are idempotent, so duplicate runs are always safe.Frequently asked questions
tp assign user tag -tag=vip -user_id=123 attaches a simple slug tag to a user, so you can mark accounts as VIP, wholesale, or win-back without inventing custom roles.tp remove user tag -tag=vip -user_id=123 to detach one tag, or tp remove user tag -all=true -user_id=123 to wipe every tag from that user at once.