Home › Guides › LearnDash affiliate plugin: setting up AffiliateWP for course sales, refunds and pending referrals

LearnDash affiliate plugin: setting up AffiliateWP for course sales, refunds and pending referrals

Short answer

AffiliateWP works as a LearnDash affiliate plugin in two ways. Its own LearnDash integration tracks course sales paid through Stripe only. Its WooCommerce integration tracks LearnDash courses sold as WooCommerce products, adds a commission rate per course and rejects refunded sales on its own. If you offer refunds, sell through WooCommerce.

Key points

  • The native LearnDash integration has no per-course rate and, in the AffiliateWP code we read, nothing that reacts to a refund. The WooCommerce route has both.
  • A card sale for a course moves from pending to unpaid within moments, so the risk is paying a commission before the refund window closes, not a referral stuck in pending.
  • Affiliates never see a pending referral in AffiliateWP’s own Affiliate Area. Our add-on, WP Referral Clarity, shows them each one with a reason, and it works on any AffiliateWP referral, including ones from the LearnDash integration.

Which LearnDash affiliate plugin setup should you pick?

Pick by how you take payment. AffiliateWP’s own docs say the LearnDash integration only supports Stripe. If you sell LearnDash courses through WooCommerce or Easy Digital Downloads, they tell you to switch those integrations on instead (AffiliateWP docs, LearnDash). Other plugins you will meet are the free Affiliates plugin, Coupon Affiliates (needs WooCommerce) and a paid WooNinjas add-on for referral points that runs on AffiliateWP itself. We build on AffiliateWP because its LearnDash integration comes in every plan (AffiliateWP, LearnDash integration).

Native LearnDash integrationWooCommerce integration
Payments trackedStripe onlyAny WooCommerce gateway
Commission per courseNo, global or per-affiliate rateYes, per product, variation or category
Refund rejects the referralNot listed by AffiliateWPYes, while the referral is unpaid
Course access removed on refundNot tested by usSet per order status in LearnDash

Where the docs stop, we read the AffiliateWP 2.36.1 code on our test site. The rest of this guide follows the WooCommerce route.

How do you connect AffiliateWP to LearnDash?

Switch on one integration, not both. Go to AffiliateWP » Settings » Integrations and tick either LearnDash or WooCommerce, then save. AffiliateWP’s own walkthrough sets the same box from its setup wizard, under Course Integrations (AffiliateWP, How to Set Up an Affiliate Program for LearnDash).

For the WooCommerce route, each course needs a product. LearnDash’s docs say to set the course to the Closed access mode first. Then pick it in the LearnDash Courses field on the product, or use the LearnDash Groups field to sell a group (LearnDash docs, WooCommerce Integration). Both fields sit on the product’s General tab, under the price.

The General tab of a WooCommerce product on our lab: regular price 149, and Working at Height Awareness picked in the LearnDash Courses field, with the LearnDash Groups field empty under it.
The course product on our lab, 13 Oct 2026: a $149 virtual product with the course picked in LearnDash Courses (WooCommerce 11.2.0, LearnDash 5.1.10, LearnDash WooCommerce Integration 2.0.3).

How do you set a different commission for each course?

On the WooCommerce route, open the course’s product and click the AffiliateWP tab in the Product data box. Choose a percentage or a flat amount in Affiliate Rate Type and enter the number in Affiliate Rate. Tick Disable referrals for a course that should never pay commission, such as a free taster sold for 0.

The AffiliateWP tab in the Product data box on our lab: Affiliate Rate Type set to Percentage, Affiliate Rate 25, Disable referrals unticked.
The same course product with its own rate: 25% while the site default stays at 20%, so a $149 sale earns the affiliate $37.25 instead of $29.80 (AffiliateWP 2.36.1).

The order AffiliateWP checks, from its WooCommerce docs (AffiliateWP docs, WooCommerce):

  1. A custom rate set on the affiliate always wins.
  2. Then the rate on a product variation, if the course is sold in variations such as with or without coaching.
  3. Then the product’s Affiliate Rate.
  4. Then the Referral Rate on its product category, under Products » Categories.
  5. Then the global Referral Rate under AffiliateWP » Settings » Commissions.

A course in two categories is checked against the first category alphabetically only. If that one has no rate, AffiliateWP does not try the others.

The native integration has none of this. In 2.36.1 it passes no course ID into the rate calculation (includes/integrations/class-learndash.php, the calculate_referral_amount() calls), so every Stripe course sale earns the global rate or the affiliate’s own rate.

What happens to the referral after someone buys a course?

It goes through four statuses. In AffiliateWP’s words, pending is “generated but is not yet confirmed” and unpaid is “confirmed and is awaiting payout”. Paid is paid, and rejected “will not be paid” (AffiliateWP docs, Referral Statuses).

On a course sale, pending is short. AffiliateWP marks a WooCommerce referral unpaid as soon as the order reaches Processing or Completed. LearnDash’s WooCommerce integration then completes orders that contain a course once payment goes through, unless you turn that off with the learndash_woocommerce_auto_complete_order filter (LearnDash docs, WooCommerce Integration, above).

On 11 Oct 2026 we read the code: the native LearnDash integration in AffiliateWP 2.36.1 writes the referral as pending and calls complete_referral() a few lines later in the same function. The affiliate’s commission is unpaid before the buyer has opened the first lesson.

Referrals do stay pending in three cases. On the native LearnDash route only the second applies.

  • The payment is not confirmed yet, such as a bank transfer left On hold.
  • You run AffiliateWP’s Force Pending Referrals add-on, which holds every new referral until an admin accepts it by hand (AffiliateWP docs, Force Pending Referrals).
  • You switched off LearnDash’s auto-complete and leave orders for a manual check.

What happens to the commission when a course is refunded?

On the WooCommerce route, the referral is rejected if it is still unpaid. The setting is Reject Unpaid Referrals on Refund, under AffiliateWP » Settings » Commissions. It rejects the referral when the order moves from Completed, Processing or On hold to Refunded (AffiliateWP docs, Automatically reject referrals if an order is refunded). Cancelled and failed orders are rejected whether that box is ticked or not.

Paid referrals stay paid. The same page says a paid referral “cannot be manually or automatically rejected”, and advises paying affiliates only after your refund period. With a 30-day guarantee, that means January’s course sales get paid in March.

The native route is weaker here. LearnDash is not in that page’s list of integrations, and the 2.36.1 LearnDash integration has no refund handling at all. If you refund a Stripe course sale, reject the referral yourself under AffiliateWP » Referrals.

Access is a separate switch. LearnDash’s Enrollment Status screen, under LearnDash LMS » WooCommerce, has a Grant or Deny toggle for each order status. Check that Refunded is set to Deny, or a refunded learner keeps the course while the affiliate loses the commission. On a fresh install of version 2.0.3 on 13 Oct 2026, Refunded was already set to Deny. The note under the table matters more: a change applies only to orders created after you save, and older orders need the retroactive tool linked there.

LearnDash LMS, WooCommerce settings on our lab, Enrollment Status panel: Processing and Completed set to Grant; Pending payment, On hold, Cancelled, Refunded, Failed and Draft set to Deny; a note says the settings apply only to new orders created after saving.
Enrollment Status as LearnDash WooCommerce Integration 2.0.3 installs it on our lab: only Processing and Completed grant access, so Refunded is already Deny.

Does the same apply to LearnDash groups?

On the WooCommerce route, yes. A product that grants a group through the LearnDash Groups field is still a WooCommerce product, so it takes its rate from its own AffiliateWP tab and is rejected on refund the same way. The Enrollment Status toggles cover groups as well as courses.

On the native route we can’t say yet. AffiliateWP’s LearnDash doc only mentions courses, and we have not tested a group bought through Stripe.

Why do affiliates think a course sale went missing?

Because AffiliateWP hides pending referrals from them. Its docs say a pending referral “will not appear in the affiliate’s dashboard” and does not count towards earnings until it is confirmed (Referral Statuses, above).

We met this from the inside when we built the affiliate panel in August 2026. AffiliateWP’s Referrals tab template asks for paid, unpaid and rejected referrals only (templates/dashboard-tab-referrals.php, line 34 in 2.36.1). A pending sale is not shown with a grey label. It is not there at all.

On course sites, two patterns send the “where is my commission?” email.

  • Held sales. With Force Pending Referrals, every course sale your affiliate drove is invisible until you approve it, which could be 30 days if you wait out your refund window.
  • Disappearing sales. Without a hold, the sale shows as unpaid, then flips to rejected when the learner asks for a refund. AffiliateWP shows the word “Rejected” and nothing else.

Our longer guide on what pending means in AffiliateWP and how to stop commission emails covers the affiliate terms and welcome email side of this.

Where does WP Referral Clarity help?

If your affiliates keep asking where a course sale went, that is the fix we sell: WP Referral Clarity, $79 a year for one site. It needs AffiliateWP, WordPress 6.5 and PHP 8.0. WP Referral Clarity is listed under our AffiliateWP add-ons, alongside our guides and comparisons for AffiliateWP sites.

It works on any AffiliateWP referral, including ones from the LearnDash integration. The affiliate panel asks AffiliateWP for that affiliate’s pending referrals by status alone, with no filter on the integration that created them. What the affiliate sees on their Referrals tab:

  • A Referral Clarity panel with “Awaiting payout (already approved)” and their unpaid total.
  • “Referrals still pending”, the 20 newest, each with its amount, a Pending badge and the reason in your words.
  • A Why column added to AffiliateWP’s own table, so a rejected course sale carries your explanation, not just the word.

You write that wording under Referral Clarity » Status Explanations. Pending might say “Course sales stay pending for 30 days, our refund guarantee.” Rejected could read “Not paid: the learner was refunded, or the sale broke our affiliate terms.” Rejected has one affiliate text, so a rejected self-referral shows the same words as a refund. Write it to cover both.

The affiliate Referrals tab on our lab: the Referral Clarity panel shows a .80 LearnDash referral held at Pending, while AffiliateWP's Referrals table says there are none yet.
A test course sale on our lab through the LearnDash integration in AffiliateWP 2.36.1, held at Pending the way Force Pending Referrals holds every new referral. AffiliateWP's own table says there are no referrals, while the WP Referral Clarity panel shows the $29.80 commission and its reason, in the default wording. We took this screenshot on version 1.1.1. The 1.1.2 and 1.1.3 changelogs leave untagged pending referrals as they were, so 1.1.3 shows the same panel.

On the admin side, the Reports screen filters by referral source, which is AffiliateWP’s record of the integration that created each referral. Pick WooCommerce or LearnDash, set the status to Rejected, and you have every rejected course commission in one view, ready to export. Rejected also covers cancelled, failed and self-referral sales, not only refunds.

Since version 1.1.2 a held course sale can show a date as well. Tag your held referrals with the return_window reason, using the short filter in the plugin’s README. The affiliate then sees “Expected to clear around” and a date: the referral’s date plus your return window, 30 days unless you change it. A hold reason with no date rule says “Held by the store. No clearing date has been set yet.” If the date passes and the sale is still pending, the panel says the usual hold period is over and the sale is waiting for your approval.

What it won’t do. It never changes a referral’s status, so approving, rejecting and paying stay in AffiliateWP. Without a tag, a pending referral shows its reason and no clearing date. It does not fix the native integration’s missing refund handling either.

FAQ

Do I need WooCommerce for a LearnDash affiliate program?

No, if every sale goes through Stripe. You need it for a rate per course and for refunds that reject the referral on their own.

Can I pay my best affiliate more on every course?

Yes. A custom rate on the affiliate’s own record beats every product and category rate, according to AffiliateWP’s WooCommerce docs.

Will the affiliate see a refunded course sale?

Yes, as rejected, if it was rejected while unpaid. A sale you had already paid stays paid.

Sources

  • AffiliateWP docs, LearnDash: https://affiliatewp.com/docs/learndash/ (updated 13 October 2025, read 11 Oct 2026).
  • AffiliateWP, How to Set Up an Affiliate Program for LearnDash: https://affiliatewp.com/how-to-set-up-an-affiliate-program-for-learndash/ (last updated 5 October 2026, read 11 Oct 2026).
  • AffiliateWP, LearnDash integration page: https://affiliatewp.com/integrations/learndash/ (read 12 Oct 2026).
  • AffiliateWP docs, WooCommerce: https://affiliatewp.com/docs/woocommerce/ (updated 11 October 2026, read 11 Oct 2026).
  • AffiliateWP docs, Referral Statuses: https://affiliatewp.com/docs/referral-statuses/ (updated 22 September 2025, read 11 Oct 2026).
  • AffiliateWP docs, Automatically reject referrals if an order is refunded: https://affiliatewp.com/docs/automatically-reject-referrals-if-an-order-is-refunded/ (updated 31 December 2024, read 11 Oct 2026).
  • AffiliateWP docs, Force Pending Referrals: https://affiliatewp.com/docs/force-pending-referrals-installation-and-usage/ (updated 23 June 2026, read 11 Oct 2026).
  • LearnDash docs, WooCommerce Integration: https://docs.nexcess.com/software/learndash/woocommerce-integration/ (last updated 2 July 2026, read 11 Oct 2026).
  • LearnDash WooCommerce Integration 2.0.3 code and admin screens on our test site with WooCommerce 11.2.0 and LearnDash 5.1.10: the LearnDash Courses and Groups fields, the Enrollment Status defaults and the learndash_woocommerce_auto_complete_order filter (checked 13 Oct 2026).
  • AffiliateWP 2.36.1 plugin code on our test site: includes/integrations/class-learndash.php, class-woocommerce.php, templates/dashboard-tab-referrals.php (read 11 Oct 2026, rechecked 13 Oct 2026), and its product AffiliateWP tab on the same site (13 Oct 2026).
  • WP Referral Clarity 1.1.2 code and README (read 12 Oct 2026), and the changelog on the live product page, which sells version 1.1.3 at $79 a year for one site (read 13 Oct 2026).

Running AffiliateWP on a LearnDash site?

Not sure which route your site is on? Tell us how your program is set up. Or go straight to WP Referral Clarity. For the other side of the program, our guide on spotting affiliate fraud in AffiliateWP covers self-referrals and odd spikes.

WP Referral Clarity. Your affiliates can't see their pending referrals in AffiliateWP. Referral Clarity shows them the 20 most recent and why each one is still pending.

View the add-on