Refer a Friend works with standard WooCommerce stores. This page lists setups that change how WooCommerce’s cart, checkout or pages behave, and what to do if you use one.
Caching and JavaScript optimization
The referral cookie is set by the plugin’s JavaScript when a visitor opens a link containing ?raf=. Page caching itself is fine. Delaying or combining JavaScript isn’t.
- In WP Rocket, LiteSpeed Cache, Perfmatters, Autoptimize or similar plugins, exclude
gens-raf-public.jsand jQuery from delay JavaScript execution and from JavaScript combining. - Make sure your CDN or redirect rules don’t drop query strings. A redirect from
httptohttpsor fromwwwto the bare domain must keep?raf=…. - If you use a cookie consent tool, mark the
gens_rafcookie as functional so it isn’t blocked.
Custom checkout plugins
CheckoutWC, FunnelKit Checkout, CartFlows and similar plugins replace WooCommerce’s checkout page. Refer a Friend works with them when they use WooCommerce’s normal cart, coupon and order functions, but you may see:
- The referral discount appearing only after the page refreshes.
- The “removed from your cart” message not showing when a fraud check removes the discount.
- Referral codes typed into a custom coupon field being rejected.
Run the full Test your referral program flow on the custom checkout. If a step fails, contact us with the checkout plugin name and version.
The standard WooCommerce block checkout and the classic [woocommerce_checkout] shortcode are both supported. Use version 4.4.7 or later for the block checkout.
WPGens Loyalty Program
The Loyalty Program plugin has its own referral feature, and both plugins store each customer’s code in the same place. When Loyalty Program creates a code first, the code doesn’t start with ref, and Refer a Friend can’t use that customer’s link or code.
Use the referral feature of one plugin only. If you need both plugins, run WooCommerce → Status → Tools → Create referrals before you turn on Loyalty Program, so every customer already has a Refer a Friend code.
Flatsome and other themes with custom My Account menus
Some themes, including Flatsome, build their own My Account menu and show an empty button next to Log out. See Customize the My Account tab for the fix.
WordPress multisite
The plugin works on multisite, with one thing to know: referral codes and referral counts are stored per user, and users are shared across the network. So:
- A customer has the same referral code on every site.
- Their referral count adds up referrals from all sites.
- Reward coupons are created on the site where the friend ordered and work only there.
Currency switchers
Reward and discount amounts are set in your store’s base currency. With a currency switcher such as Aelia or CURCY:
- Percentage rewards work in every currency.
- Fixed rewards are created in the base currency. Whether they’re converted at checkout depends on your currency plugin’s coupon settings.
If you sell in several currencies, percentage rewards are the safest choice.
WooCommerce 9.8.0 and 9.8.1 (archived)
WooCommerce 9.8.0 and 9.8.1 had a bug that loaded WooCommerce analytics scripts on every admin page. It left the Refer a Friend admin blank, along with other plugins built with React. The bug was fixed in later WooCommerce releases.
If you added the workaround snippet that used the woocommerce_navigation_is_connected_page filter, remove it after updating WooCommerce.