Skip to content

WooCommerce Automations

Update a User's Custom Field When a WooCommerce Product Is Purchased

A purchase often needs to leave a mark on the customer's account — a "VIP" flag, the date of their last purchase, a tier name another plugin reads. Zapify writes that with the A product is purchased trigger (WooCommerce) and the Update a user's custom field action (WordPress). Both are free.

What this automation does

The automation is one trigger plus one action:

  • Trigger: A product is purchased (WC_PRODUCT_PURCHASED, WooCommerce)
  • Action: Update a user's custom field (WP_UPDATE_USER_META, WordPress)

When the product you choose is purchased, Zapify sets the meta key you name to the value you give on the buyer's account.

Before you start

  • WooCommerce must be installed and active.
  • You need the exact meta key to write, for example customer_tier.
  • Both the trigger and the action are free.

How to build the automation

Step 1: Create a new automation

  1. In the WordPress admin, go to Zapify → Automations.
  2. Click Add New to open the builder.
  3. Name it clearly, such as Flag VIP customers.

Create a new automation

Step 2: Add the "A product is purchased" trigger

  1. Click Add Trigger.
  2. Choose WooCommerce as the app.
  3. Select A product is purchased.
  4. In the Product field, select the product.

Add Trigger Button

Select WooCommerce as the trigger

Select A Product is Purchased

Step 3: Add the "Update a user's custom field" action

  1. Click Add Action.

Add an action

  1. Choose WordPress as the app.

Select WordPress as the action

  1. Select Update a user's custom field.

Select Update a user's custom field

Step 4: Configure the action

Field Required What it does
User No A user ID or email. Leave empty to use the buyer.
Meta key Yes The exact custom field name, for example customer_tier.
Value No What to store. You can insert tokens, such as the order date.

Configure the Update a user's custom field action

Permission keys are blocked

The action refuses to write keys that decide what a user can do — such as the capabilities key — and reports an error instead. Use Add a role to a user for that.

Step 5: Set the steps Live and save

  1. Set both the trigger and the action to Live.
  2. Click Save.

Set the automation live

Tokens this action makes available

Token What it holds
Meta key The field that was written.
Meta value The value that was stored.

How to test it

  1. Place a test order for the product.
  2. Open the buyer's profile, or check the field with the plugin that reads it, to confirm the value.
  3. If it wasn't written, open Zapify → Logs for the reason.

Conclusion

With the A product is purchased trigger and the Update a user's custom field action, Zapify lets a purchase change what other plugins know about the customer. Next, react to that field changing with an email when a user's custom field is updated.

FAQs

What happens if the field already has a value?

It's overwritten with the new value.

Can I write to a different user than the buyer?

Yes. Put a user ID or email in the User field.

Is this feature free?

Yes. Both the trigger and the action are free.

Do I need to write any code?

No. Everything is configured in the Zapify visual builder.

Was this page helpful?