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' );