I have this PHP function that adds custom user profile fields to WordPress. It saves the field through the WooCommerce form-edit-my-account.php file. I have a lot of repeated code, and would like to clean it up.function save_sfirst_account_details( $user_ID ){    $sfirst = ! empty( $_POST['sfirst'] ) ? wc_clean( $_POST['sfirst'] ) : '';        update_user_meta( $user_ID, 'sfirst', $sfirst );    }function save_slast_account_details( $user_ID ){    $slast = ! empty( $_POST['slast'] ) ? wc_clean( $_POST['slast'] ) : '';    update_user_meta( $user_ID, 'slast', $slast );}function save_grade_account_details( $user_ID ){    $grade = ! empty( $_POST['grade'] ) ? wc_clean( $_POST['grade'] ) : '';    update_user_meta( $user_ID, 'grade', $grade);}function save_city_account_details( $user_ID ){    $city = ! empty( $_POST['city'] ) ? wc_clean( $_POST['city'] ) : '';    update_user_meta( $user_ID, 'city', $city );}function save_state_account_details( $user_ID ){    $state = ! empty( $_POST['state'] ) ? wc_clean( $_POST['state'] ) : '';    update_user_meta( $user_ID, 'state', $state);}function save_degree_account_details( $user_ID ){    $degree = ! empty( $_POST['degree'] ) ? wc_clean( $_POST['degree'] ) : '';    update_user_meta( $user_ID, 'degree', $degree );}function save_semail_account_details( $user_ID ){    $semail = ! empty( $_POST['semail'] ) ? wc_clean( $_POST['semail'] ) : '';    update_user_meta( $user_ID, 'semail', $semail );}add_action( 'woocommerce_save_account_details', 'save_student_account_details' );Can anyone help me out with this? 
Add user profile fields
php;wordpress