Sawir Referral – Refer a Friend for WooCommerce

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

Screenshots

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.

Reviews

Ogóst 12, 2026 2 replies
Just needed a basic referral system for a clients woocommerce store. Added this plugin, did some testing, and it worked fine for testing. We'll see how it goes for actual customers. I did run the plugin php code through chatgpt to see what it said. Here's the response: The code is coherent and implements the referral system you described. I don’t see obvious malicious behavior, hidden external requests, encoded code, or dangerous file operations. The flow is: A registered customer receives a reusable referral code. A friend follows the referral link or enters that code. The friend receives the configured discount. When the order reaches Completed, the referral is recorded. The plugin waits the configured hold period. It creates a separate, single-use reward coupon restricted to the referrer’s email. If the original order is fully refunded, cancelled, or failed, the reward is revoked when possible. Good signs include: Database queries using WordPress preparation methods. Admin actions protected with permissions and nonces. Output and user-controlled input generally sanitized/escaped. Reward coupons restricted to the referrer’s email. Duplicate referral events prevented by order ID. Refund reversal and delayed rewards are genuinely implemented. No customer or order information is transmitted to Sawir or another service. Important limitations “New customers only” is disabled by default. You must enable it in the settings. Rewards start only when an order becomes Completed, not Processing. For Swiss Villa’s physical orders, that likely means after fulfillment rather than immediately after payment. Self-referral prevention compares user IDs and email addresses. Someone could circumvent it with another account and email address. There’s no IP, address, payment-method, or device matching. Partial refunds do not cancel the reward. Only a full refund does. The friend’s referral coupon is reusable across customers. Its total usage limit and per-customer limit must be configured correctly. I don’t see explicit Checkout Block integration. It uses standard WooCommerce coupon systems, so it may work, but the code alone doesn’t prove full block compatibility. The reward-release process has a small concurrency risk: two simultaneous release attempts could theoretically create duplicate coupons. That’s unlikely but could be hardened. My assessment: the code makes sense and looks reasonably responsible for a free version 1.0 plugin. It gives me more confidence than its low installation count alone did. I would still test it on staging before trusting it on the live store—not because I found malicious code, but because checkout, scheduled rewards, refunds, and subscription purchases need real-world verification.
Read all 1 review

Contributors & Developers

“Sawir Referral – Refer a Friend for WooCommerce” is open source software. The following people have contributed to this plugin.

Contributors

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.