Support » Plugin: WP Referral Code » How admin can inspect New users are receiving membership links from whom?

  • Resolved tutorvip

    (@tutorvip)


    Hi WP referral code team,

    I would like to inspect that who gave a register link to new users because I want to make a relationship map between users for the better CRM.

    Thanks,
    Tutorvip team

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author shalior

    (@shalior)

    Hi

    You may want to use the wp_referral_code_after_refer_submitted hook. it fires right after the new user has registered. (i’ve named who gave a register link to new users as the referrer in code.)
    usage example:

    add_action( 'wp_referral_code_after_refer_submitted', function ($new_user_id, $referrer_user_id){
    
    	// $referrer_user_id is what you're looking for
    	// CRM integration...
    
    }, 10, 2 );

    if you need $referrer_user_id outside of hook, check the code below:

    $ref_code = new WP_Refer_Code( $user_id);
    $ref_code->get_referrer_id();

    if you want to see the referrer in the admin panel, all referral data are in the user profile.

    im not a team btw, Goodluck.

    Thread Starter tutorvip

    (@tutorvip)

    Hi, Shalior

    Thank you for your replied. But I’m so sorry , I don’t have any knowledge about coding. I just know a little bit of HTML and CSS. Could you please explain more in detail how to use those code or suggest where can I learn to use ?

    Thanks,
    Tutorvip team

    Thread Starter tutorvip

    (@tutorvip)

    Hi,

    Now, I’ve just seen all referral data from user profile from your suggestion. That’s what I want. Thank you so much.

    Tutorvip team

    Plugin Author shalior

    (@shalior)

    Hi Tutorvip, You’re welcome.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How admin can inspect New users are receiving membership links from whom?’ is closed to new replies.