This custom hook is a very basic referral system that allows you to award or deduct points from users who refer visitors and/or signups. For this to work, each user on your website gains a unique referral ID. This ID is appended to a URL that points to your website. You can point to any URL except for the wp-login.php file.
When someone who is not a member of your website uses a link, that has a referral ID attached, they receive a cookie when they arrive on your website. If you award or deduct points for referring visitors, the referring user will receive points for each unique referral. If you reward signups, the cookie the user received will trigger the payout once they finished registration.
The hook provides you with two shortcodes:
This shortcode will render the unique referral ID of the user viewing the shortcode. You can use this to show each user their referral ID.
This shortcode allows you to automatically attach the current users referral ID to a given URL. You could use this to auto generate referral links for your users. They just need to copy and share the URL any way they see fit.
- The referred visitor can not be logged in / member on your website.
- If the referred visitor hides their IP address or use a proxy that hides their IP, the hook will ignore them.
- Referred visitors that already have a cookie will not trigger payouts.
- If a user is excluded, their referrals will not trigger any points.
- Visits to the wp-login.php or wp-register.php pages will not trigger points for referring visits.
You need to set the amount of points you want to give users for referring visitors and/or registrations. If you do not want to reward one of these, just set the amount to zero. This will indicate that the instance is “disabled”.
If you have disabled registrations on your website, the registration settings will not be visible!
Once you have saved your hooks settings, you can start using the above mentioned shortcodes to inform your users about referrals.
||Give or take points from users for referring a visit.|
||Give or take points from users for referring a signup.|
If you have BuddyPress enabled, this hook has built-in support which allows you to insert a users referral ID directly into their profile. If you require users to verify their email address when they register, a signup referral will not be paid out until this verification has been completed.