bc34428d by Jeff Balicki

redirect fix

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 6d50656e
...@@ -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 $user = wp_get_current_user(); 322 if (!is_page('account') && is_user_logged_in() && !is_admin()) {
323 $updated_profile = get_user_meta( $user->ID, 'updated_profile', true ); 323 $user = wp_get_current_user();
324 if(!$updated_profile){ 324 $updated_profile = get_user_meta( $user->ID, 'updated_profile', true );
325 if (!is_page('account') ) { 325 if(!$updated_profile){
326 wp_redirect( home_url( '/account/profile/' ) ); 326 wp_redirect( home_url( '/account/profile/' ) );
327 die; 327 die;
328 }
328 } 329 }
329 } 330 }
330
331 }
332 //add_action( 'template_redirect', 'custom_redirects' );
...\ No newline at end of file ...\ No newline at end of file
331 add_action( 'template_redirect', 'custom_redirects' );
...\ No newline at end of file ...\ No newline at end of file
......