cdeuo2
Forum Replies Created
-
Hi,
I’m having a bit more trouble with this hook; it won’t let me print information for testing purposes.
Here’s what my code looks like:
function ur_new_user($valid_form_data, $form_id, $user_id) { error_log(print_r($form_id, true)) ; // parse through $valid_form_data } add_action('user_registration_after_register_user_action', 'ur_new_user', 10, 3);The goal here is to print information so I can make sure I handle the data correctly before interacting with the second DB.
What I’ve noticed:
1. The code runs fine inside the function if I just call it normally and supply it with dummy arguments (i.e. no use of ‘add_action’). The error logs are printed accordingly.
2. The code however does not seem to run (i.e. does not dump the data) when run with the hook (using with add_action).
3. User still gets created with this hook.
4. However the confirmation message at the bottom on successful user creation is no longer displayed when I use the hook.I’ve tried this on two differently hosted websites and this issue has been consistent. Hope you can help.
Thanks!
Thank you for your help.