Sawir Referral – Refer a Friend for WooCommerce

By Ricardo Sawir

★ 5.0/5 (1 ratings)30+ active installationsVersion 1.1.0

Give-and-get referral program for WooCommerce. Friends get a discount, advocates earn a reward coupon — shared by code or link, WhatsApp-first.

Description

Turn your customers into your sales channel. Every customer gets a personal referral code (a real WooCommerce coupon) and a share link on their My Account page, with one-tap WhatsApp sharing.

  • Friends get a discount — percentage or fixed amount, applied like any coupon at checkout.
  • Advocates get rewarded — a coupon issued automatically once the friend’s order is completed (or paid, if you prefer) and the hold period clears.
  • Codes, not cookies — attribution runs through the coupon on the order. Codes survive being pasted into WhatsApp, Instagram DMs, or anywhere links get mangled. Share links (?ref=CODE) simply remember and auto-apply the code.
  • Refund-safe — rewards are held for a configurable number of days. A cancellation, or refunds reaching a share of the order you choose (50% by default), cancels the reward during the hold. After the hold, the same refund automatically revokes the reward coupon if it is still unused, and flags the referral for review if it was already redeemed.
  • Fraud guards — self-referral is blocked by account and by email, including +tag and Gmail-dot variants of the same inbox. Each friend is limited to one order per code by default, codes can be capped in total, and codes are for new customers only by default. Rules are checked when the code is applied, again at checkout once the billing email is known, and again before any reward is recorded.
  • Race-safe — every referral is one database row per order, and every status change is atomic, so overlapping cron runs, webhooks, or admin clicks can never issue a reward twice.
  • HPOS and Checkout Blocks compatible — the checkout rules run in both the classic checkout and the Checkout block.

No payout system, no tax forms, no approval queues — rewards are store coupons, which keeps the money in your store.

More free plugins from Sawir Studio

FAQ

How does it compare to alternatives?

Affiliate platforms — AffiliateWP, SliceWP, Solid Affiliate — are built for recruiting external marketers, with registration flows, tracking dashboards, and payout runs. Hosted services like ReferralCandy run referral programs as a subscription outside WordPress. Sawir Referral is narrower on purpose: your existing customers share a personal coupon code or link, friends get a discount, and rewards are store coupons. Attribution runs through the coupon itself, so it survives being pasted into chat apps and needs no payout infrastructure. If you are building an affiliate channel, use an affiliate platform; if you want customers referring friends, this is the shape of that.

How is a referral attributed?

By the coupon on the order. If a referral code was used at checkout, the advocate who owns that code gets the credit when the order is completed — or as soon as it is paid (Processing), if you choose that in the settings. The hold period starts from that point. Share links just store the code in a first-party cookie and auto-apply it to the cart — there is no separate tracking system.

What happens when a referred order is refunded?

Small partial refunds keep the reward — it is a flat amount and does not scale with the order. Once refunds reach the threshold you set (50% of the order by default; 100% means only full refunds), or the order is cancelled, the reward is cancelled before it is issued. If that happens after the reward was issued, the reward coupon is automatically revoked (trashed, restorable from the coupons screen) as long as it is unused; a reward that was already redeemed is flagged in the admin list for you to review. You can also release, reverse, or revoke any referral manually from WooCommerce → Referrals.

Can customers refer themselves?

No. Codes are rejected when the customer is the code’s owner, or when their email matches the owner’s account or billing email — including +tag and Gmail-dot variants of it. The check runs when the code is applied, again at checkout, and again before the reward is recorded. Someone using a completely different email address cannot be detected by any coupon-based system; the hold period, new-customer rule, and per-friend limit keep that costly.

Can a friend use the code more than once?

By default, once per friend, matched by account and by email (including +tag and Gmail-dot variants). You can raise or remove that limit, and cap the total uses of each code. Changing the discount or limits updates every existing code in the background, so codes always match what the account page shows.

Where do customers find their code?

My Account → Refer a friend: their code, share link, copy button, WhatsApp share button, and the status of their referrals.

Screenshots

Changelog

1.1.0

  • New: choose whether the hold starts when the order is Completed or when it is paid (Processing).
  • New: refund threshold — a reward is cancelled once refunds reach a share of the order (50% by default) instead of only on a full refund.
  • New: changing the friend discount or usage limits now updates all existing referral codes in the background.
  • New: referral rules are enforced at checkout (classic and Checkout block) once the billing email is known, and re-checked before a reward is recorded; ineligible referrals are logged with the reason and an order note.
  • Improved: self-referral and per-friend checks match +tag and Gmail-dot variants of an email, and check the advocate’s billing email as well as their account email.
  • Improved: “New customers only” is now on by default (stores that already saved their settings keep their choice), and also matches earlier orders by email.
  • Fix: releasing a reward is now atomic — overlapping runs, or a refund that lands mid-release, can no longer issue a reward twice or keep one for a refunded order. The events table gains a unique index per order.
  • Fix: a referral code that cannot be auto-applied from a share link no longer leaves an error notice behind that could surface at Checkout-block payment.
  • Fix: applying a referral code to an order in wp-admin checks the order’s customer, not the logged-in admin.

1.0.0

  • Initial release: personal referral codes, share links with auto-apply, hold period with automatic reversal on full refund, unused-reward revocation, reward coupons by email, admin referral list with manual actions, and settings.