Add custom user meta data
Adding custom field to all existing users. You will have to get the list of users and then, in a loop, set a custom field for each of them. $users = get_users( [ ‘fields’ => ‘id’, ‘meta_key’ => ‘YOUR_META_KEY’, ‘meta_compare’ => ‘NOT EXISTS’ ] ); if ( is_array($users) && count($users) ) { $meta_value = false; … Read more