Redirect URL hooks are not firing
-
I know there are other support tickets pertaining to redirecting new users after registering for an account, but none of the solutions offered worked for me. I am trying to change the redirect URL programmatically. I have tried the following hooks and they do not work even after switching to the Twentytwentytwo theme and disabling other plugins (except LearnDash and ACF Pro).
add_filter( 'user_registration_login_redirect', function( $redirect_url, $current_user ) { error_log( print_r( 'user_registration_login_redirect()', true ) ); $redirect_url = 'https://newurl.com'; return $redirect_url; }, 10, 2 ); add_filter( 'user_registration_redirect_from_registration_page', function( $redirect_url, $current_user ) { error_log( print_r( 'user_registration_redirect_from_registration_page()', true ) ); $redirect_url = 'https://anotherurl.com'; return $redirect_url; }, 10, 2 );
I don’t see any of the error_log statements get printed to my PHP log and I do not get redirected with any of those hooks. I’ve tried each one separately.
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Redirect URL hooks are not firing’ is closed to new replies.