Affiliate username

Posted in

affiliates-pro/lib/core/affiliates-admin-referrals.php

Line 588: $output .= “” . stripslashes( wp_filter_nohtml_kses( $result->name ) ) . “”;

I will like to change this from full affiliate name to affiliate username.

How do i go about this?

One Response to Affiliate username

  1. antonio September 2, 2015 at 7:20 am #

    Hi Morris,
    really it’s not a good idea to change the plugin core (when you update, your changes will be lost).
    If you want to create your own solution, this code can help you:

    $name = $result->name;
    $user_id = $result->user_id;
    if ( $user_info = get_userdata($user_id) ) {
    $name = $user_info->user_login;
    }
    $output .= "<td class='name'>" . stripslashes( wp_filter_nohtml_kses( $name ) ) . "</td>";

    Kind regards,
    Antonio B.

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