redirect fix
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
1 changed file
with
4 additions
and
5 deletions
| ... | @@ -318,15 +318,14 @@ add_action( 'profile_update', function ( $user_id, $old_user_data ) { | ... | @@ -318,15 +318,14 @@ add_action( 'profile_update', function ( $user_id, $old_user_data ) { |
| 318 | 318 | ||
| 319 | 319 | ||
| 320 | 320 | ||
| 321 | function custom_redirects() { | 321 | function custom_redirects() { |
| 322 | if (!is_page('account') && is_user_logged_in() && !is_admin()) { | ||
| 322 | $user = wp_get_current_user(); | 323 | $user = wp_get_current_user(); |
| 323 | $updated_profile = get_user_meta( $user->ID, 'updated_profile', true ); | 324 | $updated_profile = get_user_meta( $user->ID, 'updated_profile', true ); |
| 324 | if(!$updated_profile){ | 325 | if(!$updated_profile){ |
| 325 | if (!is_page('account') ) { | ||
| 326 | wp_redirect( home_url( '/account/profile/' ) ); | 326 | wp_redirect( home_url( '/account/profile/' ) ); |
| 327 | die; | 327 | die; |
| 328 | } | 328 | } |
| 329 | } | 329 | } |
| 330 | |||
| 331 | } | ||
| 332 | //add_action( 'template_redirect', 'custom_redirects' ); | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 330 | } | ||
| 331 | add_action( 'template_redirect', 'custom_redirects' ); | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment