hello,
i used this (https://ww.wp.xz.cn/support/topic/referral-by-referral-code/) snippet code but it’s not working. please provide another one. it’s urgent
Hello,
Please provide any solution I’m waiting.
add_filter('wp_referral_code_new_user_ref_code' , function ($rec_code, $user_id){
if (!empty( $rec_code)){
return $rec_code;
}
return sanitize_text_field( $_POST['YOUR_FIELD_ID']) ?? null;
});
Hello, change YOUR_FIELD_ID to your field id. if you don’t know what a field id is, you need to seek help from Ultimate member guys. I’m not a UM user.
the snippet needs PHP 7>
good luck.
Hello,
Thankyou for your reply, i will try this.
hello,
you provided me code, used that code but that’s not working. it’s my humble request please help me.
Hello,
You sent me a code before, please send me a correct id name in that code so i can put in that code.