Auto login after registration not sending email, not saving data in profile
-
Hi Chad, I’m using the function below to auto login the user after they register:
function log_me_in( $user_id ) { wp_set_current_user( $user_id ); wp_set_auth_cookie( $user_id ); wp_redirect( home_url( '/wholesale/shop/' ) ); exit(); } add_action( 'user_register', 'log_me_in' );
Because of this code the new user registration email isn’t sending out, and I changed the field option names so they would save to woocommerce billing info, but it’s not doing that either; both work when the function is commented out.
Is there anything I can add to the function to ensure that both the new user reg email gets sent out and the fields save in the user profile?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Auto login after registration not sending email, not saving data in profile’ is closed to new replies.