• Resolved mohammadpoor

    (@mohammadpoor)


    hello
    thanx for make a great plugin
    how can i change showing invited list username to name or last name or both

    i dont know how do this pls hellp me.

    Shows a list of users current user invited (lists usernames by default: use hooks to change it)

    • This topic was modified 2 years, 10 months ago by mohammadpoor.
Viewing 1 replies (of 1 total)
  • Plugin Author shalior

    (@shalior)

    Hello,

    You’re welcome,
    paste this snippet in your child theme’s functions.php file. this will show the user’s first name + last name.
    hope it helps

    add_filter('wp_referral_code_invited_user_text' , function ($user_login, $user_id){
    	$user = get_userdata( $user_id );
    	if($user){
    		if (!empty( $user->first_name ) && !empty( $user->last_name)){
    			return esc_html($user->first_name . " " . $user->last_name);
    		}
    	}
    	return $user_login;
    } , 10, 2);
Viewing 1 replies (of 1 total)
  • The topic ‘how can i change username to name or last name’ is closed to new replies.