Refer & Earn
The customer's referral dashboard.
The right-rail card on Wallet Central home links to this view; chain commissions roll into the "Earned" total here:

What Customers See
┌────────────────────────────────────────────────────┐
│ H1: Refer & earn │
│ Sub: Invite friends, both of you get rewarded │
├────────────────────────────────────────────────────┤
│ Stats strip │
│ Earned ₹2,500 │ Invited 18 │ Signed up 7 │ Pending 4│
├────────────────────────────────────────────────────┤
│ Promo period chip (if active) │
│ "Promo period — boosted rewards active until …" │
├────────────────────────────────────────────────────┤
│ Personal link card │
│ https://yourstore.com/?ref=BOB22 [ Copy ] │
│ Code: BOB22 │
├────────────────────────────────────────────────────┤
│ Share buttons │
│ [WhatsApp] [X] [Email] [Messenger] │
├────────────────────────────────────────────────────┤
│ How it works │
│ 1. Share your link │
│ 2. Friend signs up + places first order │
│ 3. You get ₹100, they get ₹50 off │
├────────────────────────────────────────────────────┤
│ Your invites │
│ Avatar alice@… signed up ₹100 earned │
│ Avatar bob@… pending — │
└────────────────────────────────────────────────────┘
Stats Strip
| Tile | What |
|---|---|
| Earned | total reward credited (lifetime) |
| Invited | how many distinct people followed the link |
| Signed up | how many of those have triggered the reward (paid) |
| Pending | invited but no reward yet |
Click a tile → drills into the matching invites filter.
Promo Chip
Shows when admin enabled a time-boxed promo. Live countdown ticks every second. When window ends, chip disappears without page reload.
🔥 Promo period — boosted rewards active until 2026-04-30
Personal Link
| Element | Source |
|---|---|
| URL | home_url( '/?ref=' . $code ) |
| Code | customer's unique alphanumeric code |
| Copy button | one-click copy to clipboard |
After copy: button label flips to "Copied" for 1.5 sec.
Share Buttons
Brand-coloured deep links — WhatsApp, X, Email, Messenger. One-click share.
Customer can configure which buttons render (or admin can globally disable specific ones).
How-It-Works Card
Three steps shown in a gradient card. Editable by admin.
Invites List
Recent invites:
| Column | Source |
|---|---|
| Avatar | invitee Gravatar |
| Email / name | invitee identity |
| Status | signed_up (paid) / pending / expired |
| Reward | reward amount if > 0 |
| Joined | created date |
Empty State
"No invites yet. Share your link to start earning."
[ Copy link ]
Disabled
If admin disabled the referral feature, the whole view shows:
"Refer & earn is currently disabled."
Common Scenarios
Customer wants to share via WhatsApp
Click WhatsApp button → opens WhatsApp share dialog with pre-filled text + the customer's link.
Promo period in admin → boost on customer side
Admin enables promo with start/end + multiplier → chip appears with countdown.
Customer wonders why their friend "Pending"
Friend signed up via the link but hasn't placed a first completed order yet. Reward fires on first completed order.
When Something Goes Wrong
| Problem | Fix |
|---|---|
| Copy button does nothing | Browser blocks clipboard on insecure origin; HTTPS required |
| Share button missing | Removed from admin's enabled list |
| Promo chip not showing | Check start/end + admin toggle |
| Invites list empty after signups | Cookie attribution failed; check that the friend visited the link |
For developers — hooks
Hooks
| Hook | Type | When |
|---|---|---|
wkwp_central_referral_stats | filter | mutate stats payload |
wkwp_central_referral_share_buttons | filter | mutate share button list |
wkwp_central_referral_share_template | filter | per-button template override |
wkwp_central_referral_invites_query | filter | mutate invites list query |
