I want to create an affiliate system on WordPress . What I mean is when “Member A” invite other to join (ex. “Member B”) by using the ?referralId=MemberA querystring, then Member A get points or credits, and when Member B invite Member C, then Member B get points. Is there any WordPress plugin that can do that ?
I already tried Affiliate Pro Plus (http://wordpress.org/extend/plugins/affiliate-pro-plus/) but It’s not work as expected. When I try to register Member B using Member A’s referral, Member B does not count as Member A downline.
Don’t know about a plugin but this can be done easily with just two hooks and callback functions:
First you add the refferer field to the registration form using
register_form
hook:Then you just need to save it using
user_register
hookSo all that is left to do is to let your users share there referral link:
So if my user name was “bainternet” then my referral link would be:
and to see how many members are in a users downline here is a simple function which accepts a user ID and returns an array of user ids which he has reffered:
and its usage is simple:
So just copy all of this code and you have a plugin for referral system