Skip to content

Advanced Custom Fields Automations

How to Update an ACF User Field When a WooCommerce Product Is Purchased

If your membership level, customer tier or loyalty status lives in an ACF user field, buying a product should be able to change it. Zapify can write that field for you with the A product is purchased trigger and the Update a field on a user action.

What this automation does

The automation is one trigger plus one action:

  • Trigger: A product is purchased (WC_PRODUCT_PURCHASED, WooCommerce)
  • Action: Update a field on a user (ACF_UPDATE_USER_FIELD, Advanced Custom Fields)

When the chosen product is bought, Zapify sets the ACF profile field you pick to the value you give, on the buyer's account.

Before you start

  • WooCommerce and Advanced Custom Fields installed and active.
  • A field group whose location rule is a user form, with the field you want to set.
  • Customers who buy while logged in or who have an account created at checkout. The action needs a user to write to, unless you name one yourself.

PRO feature

The Update a field on a user action is part of the Advanced Custom Fields PRO integration and needs an active Zapify PRO licence. The WooCommerce trigger is 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 Set member tier on purchase.

Create a new automation

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

  1. Click Add Trigger.

Add a trigger

  1. Choose WooCommerce as the app.

Select WooCommerce as the trigger

  1. Select A product is purchased.

Select A product is purchased

  1. In the Product field, choose the product that should change the field.

Step 3: Add the "Update a field on a user" action

  1. Click Add Action.

Add an action

  1. Choose Advanced Custom Fields as the app.

Select Advanced Custom Fields as the action

  1. Select Update a field on a user.

Select Update a field on a user

Step 4: Configure the action

Field Required What it does
User No A user ID or email. Leave it empty to update the buyer.
Field Yes The ACF user field to write.
Value Yes What to store. Zapify converts it to what the field expects — for example Gold for a select field, Yes or 1 for a true/false field, or a date in any common format for a date picker.

For several values in one field, such as a checkbox group, give a comma-separated list like news, offers.

Step 5: Set the steps Live and save

Each trigger and action has its own Live / Off / Draft switch. A new automation starts as a Draft and does nothing until its steps are Live.

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

Set the automation live

Step 6: Test it

Buy the product with a test customer, then open that user under Users → Edit and check the field. Zapify → Logs shows the result, such as Updated "Member tier" on user 12.

Tokens you can use

The action makes three tokens available to later actions: User ID, Field name and Value, the value that was stored.

Conclusion

With the A product is purchased trigger and the Update a field on a user action, a purchase can change the customer's record on its own. To tag the same customer in your CRM, see adding a WooCommerce customer to Groundhogg.

FAQs

Is this free in Zapify?

The WooCommerce trigger is free. The ACF action needs an active Zapify PRO licence.

What if the guest has no account?

The action reports that there is no user to update. Name a user in the User field, or make sure the buyer has an account.

Will this fire an ACF field-updated trigger?

No. Zapify writes the value without going through ACF's save screens, so it does not start the ACF triggers. That is deliberate, to avoid automations triggering each other.

What happens if the value does not fit the field?

The run fails with a message naming the field and what is wrong, such as a date it could not read. Nothing is written.

Can it update a different user than the buyer?

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

Do I need to write any code?

No. Everything is configured in the Zapify visual builder.

Was this page helpful?