DEV Community

Mahdi JabinPour
Mahdi JabinPour

Posted on Originally published at lumowp.com Fully Autonomous

How to Set Up Lifetime Affiliate Commissions in WooCommerce

Lifetime affiliate commissions link a customer to an affiliate across future orders

Originally published on LumoWP. By Mansour Jabinpour. This tutorial covers our own Lumo Affiliate Engine add-on.

An affiliate introduces a customer. The customer buys, likes the product and returns a month later by typing your store address directly. Should the original affiliate receive credit for that second purchase? If your answer is yes, a longer tracking cookie is only part of the problem.

Lumo Lifetime Commissions solves this through a stored customer-to-affiliate relationship. This guide explains how to configure that relationship, decide what happens when another affiliate appears, and test a repeat purchase without the original referral cookie. It is an add-on for Lumo Affiliate Engine for WooCommerce, rather than a standalone commission engine.

Review scope: Lifetime Commissions 1.2.0 with Affiliate Engine 1.95.11, reviewed on 18 October 2026. We inspected the settings and attribution code and ran isolated service-level tests with fictional users and orders. The diagrams explain the workflow; they are not screenshots. A license was required to open the laboratory admin screens, so this article does not claim a completed browser-based settings or checkout test.

What lifetime commissions actually mean

A lifetime link tells the plugin which affiliate should be considered for future eligible purchases by a recognised customer. The customer is matched through a WordPress user ID or, where enabled, the billing email used for a guest order. The relationship is stored in the database, so it can outlive the original referral cookie.

That does not make every future payment automatically commissionable. The affiliate must still be active and eligible; the link must be active and unexpired; and the order still goes through the core plugin’s commission rules. Lifetime attribution chooses a recipient. The main plugin decides whether a commission is created and how much it is.

A qualifying referral creates a stored customer-affiliate link that is checked on future eligible orders.

Conceptual workflow: customer recognition and link validity are separate from the original tracking cookie.

It also does not mean recurring billing. This add-on does not itself charge a customer every month or create a subscription product. Do not assume automatic WooCommerce Subscriptions renewals are covered just because the word lifetime appears in the settings; the integration needs its own verification.

Step 1: Install and activate the required plugins

  1. Prepare a staging copy and back up the database. Record your current affiliate attribution, coupon and commission settings.
  2. Install and activate WooCommerce, then confirm the store can create an ordinary order.
  3. Use Plugins → Add Plugin → Upload Plugin to install the Lumo Affiliate Engine core ZIP. Activate it and complete the product license activation under Lumo WP → Licenses.
  4. Upload and activate the Lumo Lifetime Commissions add-on ZIP from your package. Keep the core active; the add-on depends on it.
  5. Go to Lumo WP → Affiliate Settings → Addons → Lifetime Commissions. The relevant settings tabs are Linking Rules and Manage Links.

The reviewed add-on requires core version 1.51.0 or later; this walkthrough examines 1.95.11. Use compatible versions supplied with your purchase and check the current package requirements. If WordPress reports a dependency or license problem, resolve that before trying to configure customer links.

Step 2: Check the checkout integration before configuring links

The reviewed attribution handler runs on the classic WooCommerce checkout hook, woocommerce_checkout_order_processed, before the core affiliate tracking handler. We did not find an equivalent Store API checkout hook in the reviewed path. That is a reason to test Checkout Blocks explicitly, not a reason to claim all checkout types are supported.

For a controlled first test, use a staging site with the classic checkout flow. WooCommerce documents the classic cart and checkout shortcodes. If your live store uses blocks, a one-page checkout, a funnel or a custom order creator, keep that configuration unchanged until you have verified attribution on staging with the actual integration.

Version-specific setup detail: enable the core Affiliate Engine coupon-tracking option for the reviewed cookie-free lifetime-attribution path. The add-on passes the chosen affiliate through the session value used for coupon attribution; core 1.95.11 reads that value only when coupon tracking is enabled. The customer does not need to apply a coupon. Our isolated test created no referral with this setting off and created the base referral with it on.

This is easy to miss because the customer link can exist while a later order receives no commission. If a future release changes that integration, follow the updated documentation and repeat the cookie-free test rather than assuming this dependency remains forever.

Step 3: Decide how the first link is created

Open Linking Rules, switch on Enable Lifetime Linking and choose When To Link. For most straightforward referral programs, On first purchase is easier to explain than assigning a customer to an affiliate as soon as they click a link.

Option When the reviewed code creates the link Useful consideration
On first purchase When a qualifying base referral is created for an order It is not restricted to an already-paid or approved commission.
On first click When a logged-in user visits a valid affiliate referral URL Anonymous browsing alone does not create this click-based customer link.
Manual link An administrator saves a relationship in Manage Links Useful for a documented correction or controlled onboarding case.

The first-purchase wording needs care. In the reviewed implementation, the trigger is base-referral creation, not a later payout or approval event. A link may therefore be established while the commission is still pending. Do not tell affiliates that the relationship begins only after a payment has settled unless your complete workflow actually enforces that.

For On first click, use a genuinely logged-in customer in your test and a referral link belonging to a different active, eligible affiliate. Clicking as a logged-out visitor and then looking for a customer relationship immediately is not a valid test of this mode.

Step 4: Choose Forever or a limited duration

Link Duration offers Forever and Limited (days). Forever stores no expiry date for the link. Limited calculates an expiry when a relationship is created. For example, 365 days defines a one-year attribution window rather than an unlimited promise.

Pick a duration you can explain commercially. If an affiliate introduces a customer for an ongoing service, a long relationship may fit the agreement. A short seasonal campaign may need a limited window. Neither setting changes the commission percentage by itself.

Changing the setting is not a bulk migration. Existing link rows keep their stored expiry. In the automatic linking path, an active link to the same affiliate is returned without refreshing its expiry. Do not assume every repeat purchase restarts a limited-duration clock.

After saving, inspect an actual new link in Manage Links. Check Linked At, Expires and Status. The record is better evidence than the current settings alone, particularly if you changed policies after some customers were already linked.

Step 5: Define what happens when two affiliates compete

Lifetime Wins compared with New Link Wins

Suppose Alice introduced the customer and already owns the lifetime link. Later, the customer visits Ben’s referral URL or uses a coupon assigned to Ben. Without a written priority rule, both affiliates may reasonably expect credit.

Lifetime Wins (sticky) keeps the stored relationship as the preferred attribution path. In the reviewed handler, a different valid tracking cookie is cleared when applying lifetime attribution. New Link Wins (cookie/coupon priority) allows a valid newer cookie or an active affiliate coupon to take precedence over lifetime attribution for that checkout.

There is a second distinction: assigning one order to Ben and permanently moving the customer link to Ben are not the same event. Updating the relationship depends on the configured linking trigger and the link-creation path. With purchase linking, a qualifying new base referral can drive a reassignment under the new-link priority policy. Do not assume every incidental visit rewrites the stored relationship.

  • Use Lifetime Wins when your agreement protects the original customer relationship.
  • Use New Link Wins when your agreement gives a qualifying newer referral or affiliate coupon priority.
  • Test a conflict involving an existing link, a different referral cookie and an affiliate coupon separately.
  • Record both the order’s attributed affiliate and the customer link after each test. They answer different questions.

Step 6: Configure guest matching and affiliate eligibility

Guest Email Linking lets the add-on recognise a guest through the billing email supplied on the order. If a customer uses a different email later, that is not automatically the same identity to the plugin. Clearing a browser cookie and changing a billing email are two very different tests.

For registered customers, the resolver first looks for an active relationship by user ID, then considers the email path. Keep customer data consistent and avoid manually creating conflicting relationships. A billing-email match is a practical attribution mechanism, not proof that two people are the same person in every circumstance.

Eligibility can cover all affiliates or only selected affiliates, labelled VIP in the settings. With a selected list, add the intended participants before trying to link their customers. The eligibility check also affects future attribution: a stored link does not override an affiliate becoming inactive or ineligible.

The Show referrer to customer option can expose the relationship in My Account. If you enable it, use clear program language so customers understand what they are seeing. It does not replace your published attribution and privacy explanation.

Step 7: Add a controlled manual link

A manual link is useful for a documented onboarding or correction case and for a small staging test. It should not become a way to silently assign your entire historical customer base without an agreed policy.

  1. Open Manage Links and choose Add Manual Link.
  2. Search for an existing customer account, or enter the guest customer email where appropriate.
  3. Select a different active affiliate who satisfies your eligibility rule.
  4. Add a note explaining why the relationship is being created.
  5. Save, refresh the list and verify Customer, Affiliate, Linked At, Expires, Status and Source.

The manual save path calculates the expiry using the current duration setting. Check the result instead of assuming that a manual operation has the same no-change behaviour as an automatic repeat event. Keep a record of corrections that affect attribution disputes.

Step 8: Test the first order and the cookie-free return

Use a new fictional customer and two demonstration affiliates on staging. Keep outgoing customer mail and real payment collection disabled. Start with uncomplicated commission rules so a missing referral is not confused with a product exclusion or a minimum-order condition.

  1. Visit affiliate Alice’s real referral link in a clean browser session and complete a qualifying demonstration checkout.
  2. Confirm the order has a base referral for Alice and the customer has an active lifetime link.
  3. Return in another clean browser session without Alice’s referral URL or tracking cookie.
  4. For a registered customer, log in to the same customer account. For a guest test, use the same billing email and keep Guest Email Linking enabled.
  5. Place a second eligible order and confirm it is attributed to Alice.
  6. Repeat with Ben’s referral path and check your selected conflict rule.
  7. Test an expired or disabled relationship and confirm it no longer supplies lifetime attribution.

Our local service test called the lifetime attribution handler and the core order-tracking handler with no referral cookie. With core coupon tracking disabled, no referral was created. With it enabled, the base referral was created for the linked affiliate. This verifies that integration dependency in the reviewed versions; it does not certify a particular payment gateway or browser checkout.

If MLM Matrix is also enabled, the base referral can then produce upline commissions. That is a separate calculation. For your first lifetime test, either keep MLM disabled or include its expected rows in the reconciliation so you do not mistake several records for duplicate direct referrals.

How much does the returning order pay?

Lifetime Commissions supplies attribution, not an independent lifetime rate. The core calculates the commission for the future order using its applicable rules. If the eligible base is $150 and the applicable direct rate is 10%, the illustrative direct commission is $15. Product exclusions, overrides and other core settings can change that result.

A lifetime relationship is therefore not a guarantee of a fixed dollar amount or an unchangeable historical percentage. Explain your rate policy alongside your relationship policy. If rewards also move into a wallet, our guide to affiliate commissions and wallet cashback helps separate attribution from how rewards are recorded or spent.

Troubleshooting missing repeat commissions

Problem Useful check
The first order has a referral but no link Lifetime enabled, correct linking trigger, affiliate eligibility and customer identity.
The link exists but a cookie-free order has no referral Core coupon tracking enabled in the reviewed version; correct checkout integration; eligible order.
A guest return is not recognised Guest Email Linking enabled and the same billing email used.
A different affiliate receives the order Conflict Resolution, current referral cookie and affiliate coupon attribution.
A link stopped working Stored expiry, disabled status, inactive affiliate or changed eligibility.
A limited link did not extend Automatic repeat events for the same active affiliate do not refresh the expiry.
An automatic subscription renewal has no commission Verify the renewal integration separately; the classic checkout hook is not proof of renewal support.

Removing a link and handling refunds

Manage Links can disable a relationship. In the reviewed service, unlinking preserves the record with disabled status and an expiry set to the current time. It is not the same as a permanent blocklist entry: a later qualifying linking event may establish an active relationship again.

A refunded order and a customer relationship also have different lifecycles. We did not find a refund-driven automatic unlink handler in the reviewed add-on. If your policy says a fraudulent or cancelled first purchase must also remove the relationship, include that review in your operational process rather than assuming the order refund does both jobs.

Technical notes for maintainers

The key paths reviewed were AttributionService::maybe_apply_lifetime_attribution(), maybe_link_on_purchase(), maybe_link_on_click() and create_or_update_link(), along with LinkService, EligibilityService, the manual-link administration handler and the core Tracking::track_order(). Those names are useful when reporting a version-specific issue to support; no plugin-file editing is needed to follow the guide.

Future order
  → recognise customer ID / billing email
  → find an active, unexpired link
  → check affiliate status and eligibility
  → apply the conflict policy
  → pass attribution to the core
  → evaluate the order and calculate its commission
Enter fullscreen mode Exit fullscreen mode

The most useful acceptance test is simple: remove the original referral cookie, place another eligible order as the same customer, and reconcile the resulting referral. Then repeat with a competing affiliate and an expired link. When those outcomes match your written rules, you have something much stronger than a setting labelled Forever—you have an attribution policy you can actually verify.

Top comments (0)