How to make first_name and last_name required fields in user profile?
You could check the $_POST variable when updating the user profile page. I would hook into user_profile_update_errors and do something along those lines. This filter will not save to DB if errors are found. add_filter(‘user_profile_update_errors’, ‘wpse_236014_check_fields’, 10, 3); function wpse_236014_check_fields($errors, $update, $user) { // Use the $_POST variable to check required fields if( empty($_POST[‘first_name’]) ) … Read more