Automattic\WooCommerce\Internal\Admin

WCAdminUser::get_user_data_values()publicWC 1.0

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

Method of the class: WCAdminUser{}

No Hooks.

Return

null. Nothing.

Usage

$WCAdminUser = new WCAdminUser();
$WCAdminUser->get_user_data_values( $user );
$user(WP_User) (required)
Current user.

WCAdminUser::get_user_data_values() code WC 7.1.0

public function get_user_data_values( $user ) {
	$values = array();
	foreach ( $this->get_user_data_fields() as $field ) {
		$values[ $field ] = self::get_user_data_field( $user['id'], $field );
	}
	return $values;
}