Created
November 19, 2020 15:58
-
-
Save jrick1229/cfd87548c66406a2492576b05fd93579 to your computer and use it in GitHub Desktop.
[AutomateWoo - Refer A Friend] Change the advocate ID to 'REF[user_id][first_name]'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('automatewoo/referrals/generate_advocate_key', 'my_automatewoo_referrals_generate_advocate_key', 10, 2 ); | |
/** | |
* @param $key | |
* @param AW_Model_Referral_Advocate $advocate | |
* @return int|string | |
*/ | |
function my_automatewoo_referrals_generate_advocate_key( $key, $advocate ) { | |
return $advocate->get_id() . "" . $advocate->get_user()->first_name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I try it and its not working. Only returns to REF[user_id]