Excuse me, want to ask,
I have tried to use this script in function.php:
add_action( 'user_register', 'myplugin_registration_save', 10, 1 );
And it worked
I want to retrieve the referral id data in the wp_uap_affiliates table.
But I realized that the add_action above runs before there is an insert process into the wp_uap_affiliates table, so I can’t get the referral id.
Does anyone have a solution? Thanks in advance.
2
Answers
Because add_action is earlier than inserting the referral id into the database, so I'm trying to find something like do_action in the Ultimate Affiliate Pro plugin script.
Then I found this code:
Then I use 'uap_on_register_action' to replace 'user_register' in my add_action.
So this is the code after replace:
Now it works. Thanks.
I checked it’s indeed updating table after that hook. can you please give a try below code in user_register hook ?