Refer a Friend works with WooCommerce Subscriptions in three ways:
- Advocates’ reward coupons can come off their next renewal automatically.
- Friends can get a discount on their subscription.
- Optionally, advocates can be rewarded every time their friend renews.
Before you start: renewal discounts need a payment gateway that lets the store change the recurring amount, such as WooPayments or Stripe. PayPal Standard subscriptions can’t be discounted.
Take rewards off the advocate’s renewal
When this is on, advocates who subscribe don’t need to type their coupon. It comes off their next renewal by itself.
- Go to WooCommerce → Refer a Friend → Settings → General Settings.
- Under WooCommerce Subscription, turn on Enable Integration.
- Choose the options you want:
- Apply All Coupons uses all unused reward coupons on one renewal, up to its price. When off, one coupon is used per renewal.
- Exclude Shipping doesn’t discount shipping.
- Enable partial coupon usage keeps the rest of a coupon’s value for the next renewal, when the coupon is worth more than the renewal.
- Save.
The discount shows on the renewal order as a negative fee called Referral applied. The coupon is marked as used. For example, with a $20 coupon and a $20 monthly plan, the advocate’s next month is free.
Discount the friend’s subscription
The friend’s discount is the coupon you set in Settings → Friend Reward → Coupon Code. Give it a subscription discount type in Marketing → Coupons:
- Sign Up Fee Discount or Sign Up Fee % Discount discounts only the sign-up fee.
- Recurring Product Discount or Recurring Product % Discount discounts the subscription price. Set Active for x payments in the coupon to limit how many renewals get it.
Which orders reward the advocate
By default, only the friend’s first subscription order rewards the advocate. Renewals don’t.
Sign-up orders are often left in Processing. If advocates aren’t rewarded, set General Settings → Generate Referral Reward On to Processing.
Reward advocates on every renewal
To reward the advocate each time their friend’s subscription renews, add this snippet. Read Add code snippets safely first. Checked with version 4.4.12.
add_action( 'init', function () {
remove_filter( 'wc_subscriptions_renewal_order_data', 'gens_prevent_referral_copying', 10 );
} );
It copies the referral to every renewal order, so each renewal is treated like a new referral order:
- The advocate gets a new reward coupon and email for each renewal.
- If Post-First Purchase friend coupons are on, the friend gets one each renewal too.
- Each renewal counts as a referral, so Reward every Nth referral and reward caps count renewals.
- Fraud checks aren’t run again. The result of the first order is reused.
It only affects renewals created after you add it.
The older snippet on this page used wcs_renewal_order_meta_query. That filter no longer has any effect, so replace it with the one above.
Related
- Subscription renewal issues
- Control who gets a referral link, including subscribers only
- General settings
- Coupon types and restrictions