WP Manifestindependent plugin directory
manifest / ecommerce / wpcalibrate-refer-reward

WPCalibrate Refer & Reward

Production-grade WooCommerce referral and store credit reward system with dynamic virtual coupons, immutable ledger, and HPOS compatibility.

★ 0stars
v1.0.2latest · 1mo ago

Install

Download wpcalibrate-refer-reward-1.0.2.zip From the v1.0.2 release on GitHub, Oct 17, 2026

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/zeeshanraza-official/wpcalibrate-refer-reward/releases/download/v1.0.2/wpcalibrate-refer-reward-1.0.2.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

WPCalibrate Refer & Reward for WooCommerce

A production-grade, enterprise-ready WooCommerce referral and customer loyalty extension. Turn existing customers into brand advocates by rewarding them with store credit while giving referred friends instant discounts at checkout.

Designed specifically for high-volume WooCommerce stores, WPCalibrate Refer & Reward pairs a zero-bloat dynamic virtual coupon engine with an immutable double-entry style financial ledger, multi-signal fraud screening, automated return window hold periods, and certified High-Performance Order Storage (HPOS) compatibility.


Table of Contents


About

Most WooCommerce referral plugins suffer from database pollution (creating hundreds of thousands of orphaned coupon posts in wp_posts), naive balance manipulation (risking negative balances and race conditions), or complex third-party SaaS dependencies with recurring subscriptions.

WPCalibrate Refer & Reward is built from the ground up as a native, self-hosted WooCommerce extension:

  • Zero Database Bloat: Friend discounts use WooCommerce virtual coupons dynamically calculated on-the-fly.
  • Accounting Ledger: Every store credit point is backed by an append-only transaction ledger ({$wpdb->prefix}wpcalibrate_referral_ledger) with balance protection that prevents negative numbers.
  • Return Window Protection: Automated hold periods powered by Action Scheduler ensure referrers are only rewarded after return and chargeback windows have closed.
  • Full WooCommerce Ecosystem Support: Seamlessly certified for High-Performance Order Storage (HPOS), WooCommerce Cart & Checkout Blocks, and Classic Checkout.

Key Features

1. Referral Codes & Link Attribution

  • Automatic Code Generation: Automatically assigns non-sequential, alphanumeric codes to customers upon registration or on-demand.
  • Custom Vanity Codes: Admins and advocates can manage personalized referral identifiers.
  • Deep-Link Attribution: Tracks referral parameters (default: ?ref=CODE) stored securely across sessions and encrypted lax cookies.
  • Configurable Attribution Models: Choose between Last-Click (recommended for sales attribution) or First-Click (for brand introducers), with configurable cookie lifetimes (1 to 365 days).

2. Universal Checkout & Dual-Mode Discount Application

  • WooCommerce Checkout Blocks: Integrated with WooCommerce Checkout Blocks via Store API with floating-label support.
  • Classic Checkout: Dedicated inline referral code input with real-time feedback and validation.
  • Universal Coupon Field Support: Shoppers can enter referral codes directly into the native WooCommerce "Have a coupon?" box on Cart or Checkout.

3. Append-Only Store Credit Accounting Ledger

  • Financial Ledger: Transactions are immutable. Balances are derived from completed credits, redemptions, and reversals.
  • No Negative Balances: Balance calculations enforce that account totals cannot drop below zero.
  • Idempotency Guarantee: Every financial operation requires a unique idempotency key, preventing accidental double-credits from network interruptions or webhook retries.
  • Flexible Store Credit Redemption: Customers can apply their store credit balance directly at checkout as a partial or full order payment.

4. Multi-Signal Anti-Fraud & Self-Referral Shield

  • Prevents referral fraud and gaming across multiple signals:
    • User ID Collision: Logged-in accounts cannot use their own referral code.
    • Email Identity Match: Normalized, case-insensitive comparison against the referrer's account.
    • Phone Number Normalization: Strips formatting and international dial codes to catch duplicate contact numbers.
    • Billing Address & Postal Code: Cross-checks physical delivery details to prevent household self-referral.
    • IP & Cookie Integrity: Flags suspicious session overlap between referrer and referee.

5. Automated Hold Periods & Refund Handling

  • Action Scheduler Queueing: Holds rewards in a pending state during customer refund/return windows (default: 14 days), automatically transitioning to approved upon maturity.
  • Proportional Refund Reversals: If an order is partially refunded, the referrer's credit is proportionally adjusted. Full cancellations or refunds automatically reverse the pending or approved reward.

6. Customer "My Account" Hub

  • Dedicated Tab: Adds a responsive "Referrals & Rewards" section inside WooCommerce My Account.
  • Live Metrics: Real-time display of Current Available Credit, Lifetime Earned Credit, and Successful Referrals.
  • 1-Click Social Sharing: Instant share buttons for WhatsApp, Facebook, X (Twitter), and Email with pre-populated copy.
  • Transaction History: Transparent breakdown of reward events and credit redemptions.

7. Merchant Administration & Audit Reporting

  • Overview Dashboard: High-level KPIs including referred revenue, active advocates, outstanding credit liabilities, and conversion rates.
  • Searchable Referral Table: Filter referrals by status (captured, pending, approved, reversed, rejected) with manual override tools.
  • Store Credit Ledger: Complete transaction history with administrative credit/debit adjustments and audit notes.
  • Spreadsheet Security: Streaming CSV export with spreadsheet formula injection defense (=, +, -, @ escaped).
  • GDPR & Privacy Compliance: Integrates with WordPress Privacy Exporter and Eraser tools.

System Architecture & Mechanics

   [ Customer A ] ──> Shares link: example.com/?ref=ALEX10
                              │
   [ Friend B ] ─────> Clicks link / Enters code at Checkout
                              │
   Attribution Manager ───────┴───> Captures Session & Secure Cookie
                              │
   Checkout / Store API ──────┴───> Dynamic Virtual Coupon: 10% OFF
                              │
   Order Placed ──────────────┴───> Referral Recorded ('pending')
                              │
   Hold Window (e.g. 14 Days) ────> Action Scheduler Background Worker
                              │
   Approval ──────────────────┴───> Immutable Ledger Entry (+Credit)
                              │
   Customer A Dashboard ──────┴───> Redemptions Applied at Next Checkout

Requirements

Requirement Minimum Recommended
WordPress 6.0+ 6.7+
WooCommerce 8.0+ 9.0+ / 11.2+
PHP 8.2 8.3
MySQL / MariaDB 5.7+ / 10.3+ 8.0+ / 10.6+
Action Scheduler 3.0+ (bundled with WooCommerce) Latest

Installation

Option 1: WordPress Dashboard Upload (Recommended)

  1. Download the latest wpcalibrate-refer-reward-1.0.2.zip from GitHub Releases.
  2. In WordPress Admin, navigate to Plugins → Add New Plugin → Upload Plugin.
  3. Choose the downloaded ZIP file and click Install Now.
  4. Click Activate Plugin.

Option 2: Manual Installation via FTP / SSH

  1. Download or clone this repository:
    git clone https://github.com/zeeshanraza-official/wpcalibrate-refer-reward.git wpcalibrate-refer-reward
  2. Upload the wpcalibrate-refer-reward directory to /wp-content/plugins/.
  3. Activate the plugin via WordPress Admin → Plugins.

Dashboard Updates via GitHub

This plugin includes a built-in GitHub Release Updater (src/Updates/GitHubUpdater.php).

When you install this plugin, WordPress will periodically check this public GitHub repository for new releases:

  • When a new release tag (e.g. v1.0.3) is published with an attached ZIP, WordPress displays an "Update Available" notice directly in Plugins and Dashboard → Updates.
  • Store managers can click "Update Now" to automatically download, unpack, and activate the update directly from the WordPress admin interface without manual FTP work.

Configuration & Usage Guide

  1. Activate the Plugin: Navigate to WPCalibrate → Refer & Reward in your admin sidebar.
  2. Configure General Settings:
    • Set Friend Discount Type (Percentage vs. Fixed Cart Discount).
    • Set Referrer Reward Type and percentage/flat amount.
    • Set Attribution Window (default: 30 days) and Attribution Model (Last-Click vs. First-Click).
  3. Set Reward Hold Period:
    • Configure hold days (e.g., 14 days) to match your store's refund return policy.
  4. Customize Customer Emails:
    • Navigate to the Emails tab to preview and toggle branded WooCommerce emails for pending rewards, approved credits, and reversals.
  5. Review Privacy Settings:
    • In Settings → Data & Privacy, configure whether referral data should be retained or deleted upon complete plugin uninstall.

Interactive Demo Testing Lab

To test the referral lifecycle without manually creating multiple test accounts, the plugin includes an Interactive Testing Lab directly inside WPCalibrate → Refer & Reward → Overview:

  • Pre-Seeded Demo Advocates:
    • ALEX10 (Alex Morgan): 10% Friend Discount | 10% Referrer Credit ($35.00 Balance)
    • SARAH20 (Sarah Jenkins): 20% Friend Discount | 10% Referrer Credit ($22.50 Balance)
    • DAVID15 (David Chen): 15% Friend Discount | 10% Referrer Credit ($14.00 Balance)
  • 1-Click Setup: Click Load Demo Data to populate 8 realistic orders across all lifecycle states (approved, pending, reversed, rejected).
  • Clean Reset: Click Clear Demo Data anytime to remove all sample records with one click.

Developer Hooks & Filters

Filters

  • wpcalibrate_rr_friend_discount_data: Modify the dynamically generated virtual coupon array.
  • wpcalibrate_rr_calculate_reward_subtotal: Filter the qualifying order subtotal before reward calculation.
  • wpcalibrate_rr_admin_menu_capability: Customize the required capability for viewing referral operations (default: manage_woocommerce).
  • wpcalibrate_rr_admin_settings_capability: Customize the capability for administrative configuration (default: manage_options).
  • wpcalibrate_rr_export_csv_headers: Add or customize exported CSV column headers.

Actions

  • wpcalibrate_rr_referral_created: Fires when a referral is initially captured ($referral_id, $order_id, $referrer_id).
  • wpcalibrate_rr_referral_status_changed: Fires when a referral transitions states ($referral_id, $old_status, $new_status).
  • wpcalibrate_rr_credit_balance_updated: Fires when store credit is earned, redeemed, or reversed ($user_id, $new_balance, $delta).

Changelog

[1.0.2] - 2026-10-17

  • Fixed: WooCommerce Checkout Blocks floating label collision ("Reffeeriraall CCooddee((optional)") under Additional order information.
  • Added: Dual-mode referral code entry: codes can now be entered into either the dedicated Referral Code checkout field OR WooCommerce's native "Have a coupon?" box.
  • Added: Automatic Store API session attribution upon entering referral codes in Checkout Blocks.
  • Added: Interactive Demo Testing Lab in the Overview tab with pre-seeded personas (ALEX10, SARAH20, DAVID15) and 1-click clipboard copy buttons.
  • Added: 1-Click "Load Demo Data" and "Clear Demo Data" admin testing controls.
  • Added: Native GitHub Update Checker for 1-click updates from the WordPress dashboard.

[1.0.1] - 2026-10-17

  • Added: High-contrast white WPCalibrate branding logo in WordPress admin sidebar with standard 20x20px icon dimensioning.
  • Added: Comprehensive "Overview" documentation tab detailing Purpose, 6-Step Merchant Workflow, and Technical Architecture.
  • Enhanced: Shared-parent menu registration safety to prevent collisions with other WPCalibrate plugins.

[1.0.0] - 2026-10-17

  • Initial production release.
  • Unique referral code generator with non-sequential alphanumeric alphabet.
  • URL attribution (?ref=CODE) and encrypted session/cookie persistence.
  • Dynamic virtual coupon engine with zero database bloat.
  • Append-only store credit transaction ledger and balance reconciliation.
  • Action Scheduler delayed reward approval workflow.
  • Proportional partial refund and complete order reversal handling.
  • WooCommerce My Account Referrals endpoint with 1-click social sharing.
  • WooCommerce Cart and Checkout Blocks integration.
  • Protected streaming CSV exports with spreadsheet formula injection defense.
  • WooCommerce branded transactional emails for reward lifecycle events.
  • Full WooCommerce High-Performance Order Storage (HPOS) compatibility.

License & Authors

Developed by WPCalibrate (support@wpcalibrate.com).

Licensed under the GNU General Public License v2.0 or later.

Releases

1 release. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v1.0.2 latest
Oct 17, 2026 1mo ago
wpcalibrate-refer-reward-1.0.2.zip
0