WooCommerce Loyalty Points & Rewards / Troubleshooting July 17, 2026

Referral Attribution Rules and Edge Cases

Understand how referral links and referral coupons are attributed, awarded, and protected from self-referrals.

Applies to 1.2.2+ Stable Verified July 29, 2026

WooCommerce Loyalty supports referral attribution from token links and generated referral coupons. These two flows share the same order referrer metadata, but coupon attribution takes priority when a referral coupon is used.

  • Referral links use the ref query parameter, such as ?ref=TOKEN.
  • When the token matches a customer referral token, the plugin stores the referrer user ID in the yowcl_ref cookie.
  • The cookie lifetime is 30 days.
  • During checkout, the cookie referrer is copied to order metadata.
  • Referral link rewards are evaluated when the order reaches completed status.

Referral Coupon Attribution

  • Referral coupons are generated for customers when referral coupon settings are enabled.
  • When a referral coupon is applied, the plugin validates the coupon owner.
  • The coupon owner cannot use their own referral coupon.
  • The coupon owner is stored in WooCommerce session data and then copied to order metadata during checkout.
  • Referral coupon reward points are awarded when the completed order is processed.

Precedence Rules

SituationResult
Order has a referral couponCoupon attribution is used and link attribution is skipped for that order.
Order has only a referral link cookieLink attribution can award both referrer and referee if settings allow it.
Purchaser is the same user as the referrerThe reward is skipped or the coupon is rejected as self-referral.
Guest order from referral linkLink referral rewards are skipped because the referee must be a registered purchaser.
Referral settings have no points for the referrer roleNo reward is awarded, and the order may remain unmarked for that skipped flow.

Common Troubleshooting Checks

  1. Confirm referral link or referral coupon settings are enabled.
  2. Log in as the referrer and confirm the referral token or coupon exists.
  3. Visit the referral link in a clean browser session and confirm checkout happens within 30 days.
  4. Complete the order as a different registered customer when testing link rewards.
  5. Move the order to completed status and check the points history for referral action labels.
  6. For coupon tests, confirm the coupon owner is not the same as the checkout user.

What To Capture For Support

  • Referrer user ID and referee user ID.
  • Referral link URL or coupon code used for the test.
  • Order ID and final order status.
  • Screenshot of referral settings.
  • Filtered points history rows for the order.

Related Guides

Continue from WooCommerce Loyalty Points & Rewards documentation to the complete product workflow.

Evaluate product scope on the money page, use the pillar Guide for decisions and trade-offs, and return here for exact configuration.

Need support?

Still stuck?

Open a support request and include this article title, your plugin version, and what you already tried.

Open Support