WordPress at a glance
function is not described

Automattic\WooCommerce\Admin

Loader::get_user_data_field() public WC 1.0

Helper to retrive user data fields.

Migrates old key prefixes as well.

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

No Hooks.

Return

Mixed. The user field value.

Usage

$result = Loader::get_user_data_field( $user_id, $field );
$user_id(int) (required)
User ID.
$field(string) (required)
Field name.

Code of Loader::get_user_data_field() WC 5.2.2

<?php
public static function get_user_data_field( $user_id, $field ) {
	$meta_value = get_user_meta( $user_id, 'woocommerce_admin_' . $field, true );

	// Migrate old meta values (prefix changed from `wc_admin_` to `woocommerce_admin_`).
	if ( '' === $meta_value ) {
		$old_meta_value = get_user_meta( $user_id, 'wc_admin_' . $field, true );

		if ( '' !== $old_meta_value ) {
			self::update_user_data_field( $user_id, $field, $old_meta_value );
			delete_user_meta( $user_id, 'wc_admin_' . $field );

			$meta_value = $old_meta_value;
		}
	}

	return $meta_value;
}