Last updated
Use this page when a friend’s referral discount shows in the cart but is removed at checkout, usually with this message:
The coupon has been removed from your cart. You are an existing customer and are not entitled to a referral discount.
The removal is the fraud protection doing its job. When the friend enters their billing details, the plugin checks them against earlier orders. If they match, the referral discount is taken off before the order is placed.
Why the discount was removed
The discount is removed when any of these is true, unless you’ve turned that check off in WooCommerce → Refer a Friend → Settings → Fraud Settings:
| Check | Removed when | Setting that turns it off |
|---|---|---|
| The billing email has a Processing or Completed order, or the logged-in customer has a Completed order. | Disable Email check | |
| Phone | The billing phone matches an earlier order. | Disable Phone Number check |
| Address | The street address (address line 1) matches an earlier order. | Disable Street Address check |
| IP address | An earlier order was placed from the same IP address. | Disable IP check |
| Self-referral | The billing email belongs to the advocate who shared the link or code. | Can’t be turned off |
The phone, address and IP checks look at earlier orders in almost every status, including Pending payment, On hold and Cancelled. Only Failed orders and checkout drafts are ignored. Abandoned test orders are a common reason for unexpected removals.
Disable Email check also turns off the phone, address and IP checks, and lets existing customers get the referral discount on every order. Use it only for short tests.
Fixes
- A genuinely new customer shares a household or office with an earlier customer. Turn off just the check that matched. Disable IP check is the most common choice, because many people share an IP address. Leave the others on.
- You’re testing. Use new details for the friend, or delete your old test orders. See Test your referral program.
- The friend coupon has an email restriction. If WooCommerce says the coupon isn’t valid for your email address, open the coupon from Settings → Friend Reward → Coupon Code in Marketing → Coupons and clear Usage restriction → Allowed emails.
- Two referral discounts were in the cart. Only one referral discount is allowed per order. The plugin keeps the first and removes the others.
Change the message
To change the wording customers see, use the gens_raf_coupon_removal_message filter. Paste this with a code snippets plugin, as described in Add code snippets safely. Checked with version 4.4.12.
add_filter( 'gens_raf_coupon_removal_message', function () {
return 'Referral discounts are for first orders only, so we removed it from your cart.';
} );
Check it worked
Repeat the friend’s checkout in a private window with the same details. The discount should stay in the order totals after you enter the billing details.