WooCommerce Automations
Enrol a User on a LifterLMS Course When a WooCommerce Product Is Purchased
You sell course access as a WooCommerce product — alongside, or instead of, LifterLMS's own checkout — and want the buyer enrolled automatically instead of by hand. Zapify does this with the A product is purchased trigger (WooCommerce) and the Enrol a user on a course action (LifterLMS). Both integrations combine here; LifterLMS is a Zapify PRO integration.
What this automation does
The automation is one trigger plus one action:
- Trigger: A product is purchased (
WC_PRODUCT_PURCHASED, WooCommerce) - Action: Enrol a user on a course (
LIFTERLMS_ENROL_USER, LifterLMS)
When the WooCommerce product you choose is purchased, Zapify enrols the buyer on the LifterLMS course or membership you specify.
The action calls LifterLMS' own llms_enroll_student() function rather than writing enrolment data directly, so it fires LifterLMS' own enrolment hooks and behaves exactly like a normal enrolment — including anything else on the site that listens for one.
Before you start
- WooCommerce and LifterLMS must both be installed and active.
- Zapify PRO must be active, since enrolling on LifterLMS is a PRO action.
- You need the product that should grant access, and the course ID it should unlock. Find the ID in the course's edit URL in your WordPress admin —
post.php?post=123&action=editmeans the ID is123.
PRO feature
The Enrol a user on a course action (LIFTERLMS_ENROL_USER) is part of the LifterLMS PRO integration. The A product is purchased trigger itself is free (WooCommerce).
How to build the automation
Step 1: Create a new automation
- In the WordPress admin, go to Zapify → Automations.
- Click Add New to open the builder.
- Name it clearly, such as Enrol buyer on course after purchase.

Step 2: Add the "A product is purchased" trigger
- Click Add Trigger.
- Choose WooCommerce as the app.
- Select the trigger A product is purchased.
- In the trigger's Product field, select the specific product that should unlock the course.



Leaving the Product field empty runs the automation for every purchase on the store, which is only useful if every product should grant the same course access — for this use case, select the specific product.
Step 3: Add the "Enrol a user on a course" action
- Click Add Action.
- Choose LifterLMS as the app.
- Select Enrol a user on a course.



Step 4: Configure the action
| Field | Required | What it does |
|---|---|---|
| Course or membership ID | Yes | The post ID of the LifterLMS course (or membership) the buyer should be enrolled on. |
| User | No | Leave empty to use the person the automation is running for — the buyer. Fill it in only to enrol someone else. |

Step 5: Set the steps Live and save
- Set both the trigger and the action to Live.
- Click Save.

Tokens this action makes available
| Token | What it holds |
|---|---|
| Course ID | The course or membership ID that was enrolled. |
| User ID | The ID of the user who was enrolled. |
How to test it
- Place a test order for the selected WooCommerce product and mark it as paid (or use a test payment gateway).
- Log in to LifterLMS as that customer, or check their enrolment from the admin side, to confirm they now have access.
- If access wasn't granted, open Zapify → Logs — a failed enrolment reports the reason LifterLMS gave.
Conclusion
With the A product is purchased trigger and the Enrol a user on a course action, Zapify sells LifterLMS course access through your existing WooCommerce store without manual enrolment. Next, undo the access automatically on a refund with remove LifterLMS course access when a WooCommerce order is refunded, or compare plans in Zapify Free vs Pro.
FAQs
Can one WooCommerce product unlock more than one course?
Yes. Add a separate Enrol a user on a course action for each course, each with its own course ID.
Is this feature free?
The A product is purchased trigger is free. The Enrol a user on a course action is part of the LifterLMS PRO integration, so it needs an active PRO licence.
Does this replace LifterLMS's own checkout?
No. It's an alternative way to grant access — useful when you'd rather sell through WooCommerce. You can use either checkout, or both, on different products.
Do I need to know the exact course ID?
Yes. Open the course in your WordPress admin and copy the ID from the edit URL.
What happens if the enrolment fails?
The action reports a failure — for example if the course ID doesn't exist — and that failure is visible in Zapify → Logs, so you can spot and fix a misconfigured course ID.
Do I need to write any code?
No. Everything is configured in the Zapify visual builder.