AffiliateWP Automations
How to Make a Student an AffiliateWP Affiliate When They Complete a LearnDash Course
Your best promoters are often people who have just finished your course. To make a student an AffiliateWP affiliate when they complete a LearnDash course, use Zapify's A user completes a course trigger with the Make the user an affiliate action. AffiliateWP and LearnDash are Zapify PRO integrations.
What this automation does
The automation is one trigger plus one action:
- Trigger: A user completes a course (
LEARNDASH_COURSE_COMPLETED, LearnDash) - Action: Make the user an affiliate (
AFFWP_CREATE_AFFILIATE, AffiliateWP)
When a student completes the course you choose, Zapify makes them an affiliate with the status you set.
PRO feature
LearnDash and AffiliateWP are Zapify PRO integrations, so this automation needs an active Zapify PRO licence.
No Connection needed for AffiliateWP
AffiliateWP runs on your own site, so there is no API key to paste for it and nothing to set up under Settings → Connections.
Before you start
- AffiliateWP installed and active.
- LearnDash installed and active, with a course students can finish.
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 Graduates become affiliates.

Step 2: Add the "A user completes a course" trigger
- Click Add Trigger.

- Choose LearnDash as the app.

- Select A user completes a course.

- In the Course field, pick the course, or leave it as any course.
Step 3: Add the "Make the user an affiliate" action
- Click Add Action.

- Choose AffiliateWP as the app.

- Select Make the user an affiliate.

Step 4: Configure the action
| Field | Required | What it does |
|---|---|---|
| User | No | Leave empty to use the user this automation is running for, or enter a user ID or email to act on somebody else. |
| Status | Yes | Active approves them straight away. Pending approval puts them in your approval queue. |
| Rate | No | A commission rate for this affiliate. Leave empty to use your program's default. |
| Rate type | No | Program default, Percentage (%) or Flat amount. A percentage must be between 0 and 100. |
| Payment email | No | Where they get paid. Leave empty to use the user's own email address. |
| Notes | No | Private notes on the affiliate, shown to admins only. |
For example, set Status to Pending approval so you can review graduates before they earn commission. Leave User empty so the student becomes the affiliate.
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.
- Set the trigger and every action to Live.
- Click Save.

Step 6: Test it
Complete the course as a test student, then check AffiliateWP → Affiliates.
Tokens you can use
| Token | What it holds |
|---|---|
| Course ID | The numeric ID of the course. |
| Course title | The course's name. |
| Course URL | The permalink to the course. |
The action makes two tokens available to later actions: Affiliate ID and Affiliate referral URL. If the user is already an affiliate, the action succeeds and changes nothing, so a retry never turns into an error.
Conclusion
With the A user completes a course trigger and the Make the user an affiliate action, graduation turns into promotion. To approve them automatically after a training course instead, see approving an affiliate when a LifterLMS course is completed.
FAQs
Is this free in Zapify?
No. AffiliateWP and LearnDash are both Zapify PRO integrations and need an active Zapify PRO licence.
Does it run again if they redo the course?
If they are already an affiliate, the action succeeds and changes nothing.
Can I use a different course platform?
Yes. The same action works after any Zapify trigger that runs for a user, such as a LifterLMS or Tutor LMS completion.
Do I need to write any code?
No. Everything is configured visually in the Zapify builder.