src/User/User.php
public function update(array $data): User
    {
        $user = wp_update_user(array_merge($data, [
            'ID' => $this->ID
        ]));

        if (is_a($user, 'WP_Error')) {
            throw new UserException($user->get_error_message());
        }

        return $this;
    }
public function update(array $data): User
    {
        $user = wp_update_user(array_merge($data, [
            'ID' => $this->ID
        ]));

        if (is_a($user, 'WP_Error')) {
            throw new UserException($user->get_error_message());
        }

        return $this;
    }
public function update ( array $ data ) : User { $ user = wp_update_user ( array_merge ( $ data , [ 'ID' => $ this -> ID ] ) ) ; if ( is_a ( $ user , 'WP_Error' ) ) { throw new UserException ( $ user -> get_error_message ( ) ) ; } return $ this ; }
Update user properties.

@param array $data

@throws UserException

@return User
Update user properties .