[referrer_user] pulling from cookie

Hi there.

when the [referrer_user direct=”true” display=”user_email”] it pulls information off the cookie, is there a way to make it pull information from the database? or is there another shortcode?

We have a custom page where the user can log in and see who referred them….but if the user changes their email address somehow this breaks and it then shows. See this example


Any ideas?



11 Responses to [referrer_user] pulling from cookie

  1. Kento January 22, 2016 at 11:43 am #

    Hi Joel,

    We’ve released an update with new shortcodes [referrer], [affiliates_is_referred] and [affiliates_is_not_referred] and improved things so that these will have the referrer information available during first load. See this documentation page for examples please.


  2. Joel January 19, 2016 at 8:17 pm #

    also we tried to comment that line out but it returns blank

  3. Joel January 19, 2016 at 8:16 pm #

    Hi George. Thank you so much. I think we are getting closer…

    we are getting an error “PHP Fatal error: Call to undefined function write_log() in /home/happyhealthy/public_html/wp-content/themes/TeamAffiliate/functions.php on line 1245”

    Screenshot here


    Any ideas?

    • Kento January 20, 2016 at 12:54 pm #

      Hi Joel,

      Just remove the write_log() line, George had probably written a helper function named liked that and forgot to remove it.


  4. George January 19, 2016 at 6:25 pm #

    Hi Joel,

    I see the problem, indeed it gets the cookie value.
    However, you can use this shortcode i’ve created to display the referrer.

    I will also delete your other post, to keep the forum clean from duplicates.

    Kind regards,

  5. Joel January 19, 2016 at 6:06 am #

    I recorded a video example for you


    I think [referrer_user] is not going to the database at all and only looking for the cookie. If the cookie is not there it shows nothing.

    Any way to fix this?

    We have an urgent project we just launched that is broken right now.


  6. Joel January 18, 2016 at 4:21 pm #

    Thanks George so now we are seeing this problem with all of our users…..even if they don’t change their email. It looks like that if they clear their cookies or access from another device [referrer_user] is not accessing the database…..it’s just looking for a stored cookie.

    Any ideas?


    • Kento January 19, 2016 at 5:32 pm #

      Hi Joel,

      It seems that my reply here has gone unnoticed. Quoting “… What we鈥檒l do is look into the possibility to provide this functionality, it鈥檚 a good suggestion in any case so an improvement in that sense is welcome anyhow. … Do you have a few days so we can look into it, implement and test? …”


      • Joel January 19, 2016 at 8:31 pm #

        Thanks Kento….we didn’t notice your reply….and yes we would LOVE that functionality and really need it bad. Yes we can wait a few days for sure….the faster the better. 馃檪

        • Kento January 20, 2016 at 12:56 pm #

          Great, thanks for your patience and feedback Joel!

  7. George January 15, 2016 at 5:18 pm #

    Hi Joel,

    This happens because affiliate and user accounts are linked. Therefore, when the user changes email address without updating affiliate record, the affiliate is not linked to a user.

    Try updating affiliate information with the same email.

    Kind regards,

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

AffiliatesContactJobsTerms & ConditionsPrivacy PolicyDocumentationDownloadsUseful PluginsMy Account