WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Admin

Loader::update_user_data_values() public WC 1.0

For all the registered user data fields ( Loader::get_user_data_fields ), update the data for the REST API.

{} It's a method of the class: Loader{}

No Hooks.

Return

null. Nothing.

Usage

$result = Loader::update_user_data_values( $values, $user, $field_id );
$values(array) (required)
The new values for the meta.
$user(WP_User) (required)
The current user.
$field_id(string) (required)
The field id for the user meta.

Code of Loader::update_user_data_values() WC 5.8.0

public static function update_user_data_values( $values, $user, $field_id ) {
	if ( empty( $values ) || ! is_array( $values ) || 'woocommerce_meta' !== $field_id ) {
		return;
	}
	$fields  = self::get_user_data_fields();
	$updates = array();
	foreach ( $values as $field => $value ) {
		if ( in_array( $field, $fields, true ) ) {
			$updates[ $field ] = $value;
			self::update_user_data_field( $user->ID, $field, $value );
		}
	}
	return $updates;
}