This hook allows you to reward your users points for making referrals using the AffiliateWP plugin. You can select to reward users for signing up as an affiliate, referring signups on your website or referring WooCommerce store sales.
This hook will not be visible if AffiliateWP is not enabled.
Make sure you set a point value other than zero for the instances that you want to use. For the store referral instance, please see the guide below.
When it comes to rewarding store referrals, the hook offers three options:
This is the default option and it will reward / deduct a set amount for all referrals no matter the order amount.
If you have multiple point types setup, you can select to enable this option for any number of types.
If your store has been setup to use points as it’s currency, you can select this option in order to reward a percentage of the order amount to the user that made the referral.
In order to use this option, we must set AffiliateWP to use the same point type that you set your store to use. Before we can do that, we first need to set a unique currency code for our point type. This is the only way that AffiliateWP can display points as a currency. By default the MYC code is used which is not used by any real currency but if you have customized this in your store, you need to add this custom code here as well. For most users this should be left as is.
This option can not be used multiple times! If you have multiple point types setup, this hook can only be enabled for the point type your store is setup to use.
If your store is using a real currency and AffiliateWP is setup to use the same currency, you can select this option in order to convert users commissions into their point value using an exchange rate. This exchange rate is then applied to the commission amount and paid out in points.
If you have multiple point types setup and wish to reward more than one type for each commission, you can do so by enabling the hook for all point types you want to pay out. Just make sure they are all set to use this option for store referrals, the exchange rate, log template can of course be different if you want.
When a store commission is undone, e.g. the commission’s status is changed from “Paid” to anything else, the hook will undo the payment it made when the commission was originally paid out. If however a commission has not been paid out and is undone, the hook will take no action.
||Give or take points from users for becoming an affiliate.|
||Give or take points from users for referring site visits.|
||Give or take points from users for earning a commission in a store sale.|
||Give or take points from users for a store sale commission being refunded.|