Sign inDocsBlogAboutSupportContact
Users

Tag WordPress and WooCommerce users with clean, durable labels

Attach slug labels to any user from a command, macro, or schedule, then read them back per user in your automations. Stored as proper indexed user_meta, idempotent, no custom tables, no plugin conflicts.

4 min read May 2026 assign user tag

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

Install a membership or CRM plugin Full membership systems solve this, but they ship payment gateways, content restriction, and fifty settings pages. That is a lot of overhead when you just want a label on a user record.
Write a custom user_meta value by hand Cramming a comma-separated list into one meta row looks neat until you maintain it. Adding and removing one label means reading, editing, and rewriting the whole string, and a stray substring like vip inside vip-trial quietly corrupts your logic.
Track it in a spreadsheet outside WordPress A spreadsheet is always out of sync. Every time a user cancels, upgrades, or changes email you have to remember to update two systems. You won't, and eventually the list lies.

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.

TrueCommander
Tag assigned
User 123 is now tagged vip
Tag vip stored as trc_user_tagindexed
Idempotent: re-running is a no-op
Readable with get user metaper user

Shown 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.

CommandWhat it does
assign user tagAttaches 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 tagDetaches 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

1
Attach a tag with 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.
2
Read a user's labels with 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.
3
Remove a tag with 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.
DetailValue
Command namesassign user tag, remove user tag
Tag formatSlug: lowercase, hyphens for spaces, [a-z0-9_-] only, 1 to 100 characters
StorageIndividual user_meta rows, meta_key trc_user_tag, one row per tag per user
IdempotencyAssign is a no-op if the tag exists. Remove returns not_tagged if the tag is absent. Neither throws an error.
Bulk usageChain 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

Frequently asked questions

Ready?

Start tagging users in seconds.

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.