Support

Account

Home Forums General Issues Profile Update with Custom Field filled by user who updated the profile

Unread

Profile Update with Custom Field filled by user who updated the profile

  • I’ve created a custom text field that will automatically filled whose current updating or modifying the user profile. I’m using update_field(); but technically I cannot see it working even the var_dump();

    function update_user() {           
    
        $user = wp_get_current_user();
        var_dump($user);
    
        update_field( 'field_673bbd254e89a', $user->display_name, 'user_'.$user->ID );
    
    }
    add_action( 'acf/save_post', 'update_user' );
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.