Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

update user meta wp code


$user_id = 1234;

$metas = array( 
    'nickname'   => $userFirstName,
    'first_name' => $userFirstName, 
    'last_name'  => $userLastName ,
    'city'       => $userCityID ,
    'gender'     => $userGenderID
);

foreach($metas as $key => $value) {
    update_user_meta( $user_id, $key, $value );
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #update #user #meta #wp #code
ADD COMMENT
Topic
Name
5+3 =