Partner (affiliate) program for WooCommerce
A store that wants to sell through referrals usually pays a subscription for an external affiliate platform or installs a heavy plugin that still does not match its own settlement rules. We built a bespoke partner program from scratch โ as a universal tool that can be tailored to any WooCommerce store. A partner gets their own link and a stats dashboard, the store automatically tallies commissions (with a ledger and refund handling), and the owner pays out only what has matured after the returns window. It all stays on your side: no subscription for someone else's tool and no handing your sales data to a third party.
How it works โ step by step
Partner referral link
Every partner gets their own /r/their-name link. A visit through the link stores the referral in a cookie (e.g. for 60 days).
The customer buys
Even if they come back a few days later โ the referral still holds. Commission is calculated from the right order, after discounts.
Tallied to a ledger
The system records the commission in a ledger. A refund or cancelled order automatically reverses it โ the balance always adds up.
Hold period
Commission first matures for a set time (the returns window), and only then moves to "ready for payout".
Live analytics
Clicks, conversion, top products and traffic sources, monthly charts โ in the admin panel and the partner dashboard.
Payout
Once the threshold is passed. Payout history and the partner's bank details (IBAN) all in one place.
Notifications
An email to the owner about every referral sale and a monthly summary for the partner โ automatically.
What you get
Referral sales
Your own affiliate program without a monthly subscription for an external platform.
Rules for your store
Rates per product and category, percentage or fixed commission, modes: every order / first purchase / lifetime.
Partner coupons
A discount code tied to a referral link is a second attribution path and a real incentive for the customer to buy.
Fair settlements
A ledger that reverses on refunds and a hold period โ you only pay out commissions that have actually matured.
Partner and admin panels
Partners see their own stats and generate links. You keep full control, the rules and CSV export.
Failure resilience
Self-defense on a load error and a guard that protects against the "white screen". Compatible with WooCommerce HPOS.
Details
Attribution that does not lose sales
We record the referral along two paths: a cookie set on the referral-link click (with a configurable window, e.g. 60 days) and a discount coupon tied to the partner โ for when the customer types the code themselves without clicking the link. As a result the commission reaches the right person even when the customer buys after a few days or from a different device. Deep links let a partner drive traffic to any subpage of the store, not just the homepage.
Settlements under full control
The commission is computed by an engine per order line item, with rule priority: product rate, then category, and finally the referral link's default rate. You can set the attribution window, the order status that triggers the tally, the hold period (returns window), the minimum payout threshold and the commission mode. The balance always distinguishes matured amounts (ready for payout) from those still on hold, and every payout is recorded in history with the partner's bank details.
Universal โ for any store
This is not an off-the-shelf marketplace product or an overlay on someone else's platform, but a tool written from scratch and configurable in the admin panel. It does not depend on heavy libraries, declares compatibility with the new WooCommerce order system (HPOS) and can be adapted to any range โ from a single product to a large store. You run the program on your own site, and the data stays in your database.
For the curious โ how it works under the hood. This is a WooCommerce plugin written from scratch: custom database tables, WP-Cron jobs for maturing commissions and building summaries, charts drawn as inline SVG (no external libraries) and declared HPOS compatibility.
Commission engine and ledger
The tally starts on a configurable order status (rather than being hard-wired to "completed"). Commission is calculated per line item with rule priority product โ category โ referral-link rate, and the ledger reverses the entry on a refund or cancellation. The balance separates matured amounts from those on hold; maturing is handled by a daily WP-Cron plus a safeguard on entering the panel.
Attribution and deep links
The /r/{slug} referral link validates its own host and stores attribution in a cookie and in the order meta. The second path is a WooCommerce coupon created/updated per referral link and auto-applied after arriving via the link. Deep links /r/{slug}?to=/path take the visitor to the target spot in the store. HPOS compatibility is declared via WooCommerce FeaturesUtil.
Reliability and licensing
The plugin loads inside try/catch โ an error does not take down all of WordPress, it only suspends the module itself. An independent "Guardian" mu-plugin detects a fatal error (register_shutdown_function) and auto-disables the plugin on the next request, controlled over HTTP. On top of that a remote kill-switch (lock / unlock / status) is driven by a secret compared with hash_equals โ a soft licensing lever that blocks only the admin, not the sales.