Get affiliate info in template without shortcode

Hi,

how can i get an affiliate data, like name, username, email… to display in my template by using his affiliate id? and how can i get that data to use in a action?

couldn´t find in the documentation

thanks

3 Responses to Get affiliate info in template without shortcode

  1. George June 6, 2017 at 9:42 am #

    You are welcome Bruno!

  2. Bruno June 5, 2017 at 7:48 pm #

    Great, thank you very much!

  3. George June 5, 2017 at 11:07 am #

    Hi Bruno,

    Since you have the affiliate id, you can use something like this snippet to display the affiliate data:

    $affiliate_id = 1;
    $current_user_id = affiliates_get_affiliate_user( $affiliate_id );
    $current_user = get_user_by( 'ID', $current_user_id );
    if ( $current_user ) {
    echo 'Username: ' . $current_user->user_login . '';
    echo 'User email: ' . $current_user->user_email . '';
    }

    The plugin API can be found here.
    Kind regards,
    George

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share