Skip to content

BuddyPress Automations

Add a User to a BuddyPress Group When a WooCommerce Product Is Purchased

Paid communities, premium cohorts and member-only clubs all work the same way: someone buys, and then they should be in the right group straight away. Zapify does this at checkout with the A product is purchased trigger (WooCommerce) and the Add a user to a group action (BuddyPress), so there is nothing to approve by hand.

What this automation does

The automation is one trigger plus one action:

  • Trigger: A product is purchased (WC_PRODUCT_PURCHASED, WooCommerce)
  • Action: Add a user to a group (BP_ADD_USER_TO_GROUP, BuddyPress)

When the WooCommerce product you choose is purchased, Zapify adds the buyer to the BuddyPress group you specify. This works for public, private and hidden groups, which makes it a good fit for a private paid group.

Before you start

  • WooCommerce and BuddyPress must both be installed and active, with the User Groups component switched on in your BuddyPress settings. Zapify's BuddyPress integration is not available on sites running BuddyBoss Platform.
  • You need the product that should grant group access, and the group it should add buyers to.

The customer needs a WordPress account

The buyer is added to a group as a member, so they need a WordPress account. Guest checkouts have no account to add, so this automation only affects orders placed by a logged-in customer, or a guest order matched by WooCommerce to an existing account by email.

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 Add buyers to the Members Club group.

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 the trigger A product is purchased.
  4. In the trigger's Product field, select the specific product, for example your membership product.

The trigger fires when the order reaches a paid status, such as Processing or Completed.

Add Trigger Button

Select WooCommerce as the trigger

Select A Product is Purchased

Step 3: Add the "Add a user to a group" action

  1. Click Add Action.
  2. Choose BuddyPress as the app.
  3. Select Add a user to a group.

Add an Action

Select BuddyPress as the action

Select Add a user to a group

Step 4: Configure the action

Field Required What it does
User No Leave empty to use the person the automation is running for — the buyer.
Group Yes The group to add the buyer to. Pick it from the list.

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

Later actions in the same automation can use these:

Token What it holds
User ID The ID of the user who was added.
Group ID The ID of the group.
Group name The name of the group.

How to test it

  1. Place a test order for the selected product as a logged-in customer and mark it as paid.
  2. Open the group in BuddyPress and check its member list.
  3. If they were not added, open Zapify → Logs. The log says why, for example that the group no longer exists or the buyer is banned from it.

Conclusion

With the A product is purchased trigger and the Add a user to a group action, Zapify turns a WooCommerce sale into instant access to your BuddyPress community. Next, welcome the buyer with a message in the group's stream using add a BuddyPress activity when a WooCommerce product is purchased, or email them when they land in the group with send an email when a user joins a BuddyPress group.

FAQs

Does the buyer have to accept an invitation?

No. The action makes them a full member straight away. It skips invitations and approval, and clears any pending invitation or request they had for that group.

What happens if the buyer is already in the group?

Zapify treats it as a success and logs that they are already a member. Nothing breaks, so a repeat purchase is safe.

What if the buyer is banned from the group?

They are not added, and the log tells you why. A ban set by a group admin is respected.

Will this also run my "A user joins a group" automations?

Yes. The action uses BuddyPress's own join function, so adding someone counts as that person joining the group, and any automation listening for A user joins a group runs too. That makes it easy to follow up with a welcome email.

Is this feature free?

Yes. WooCommerce and BuddyPress are free Zapify integrations, and both the A product is purchased trigger and the Add a user to a group action are included in the free plan.

Do I need to write any code?

No. Everything is configured in the Zapify visual builder.

Was this page helpful?