Automattic\WooCommerce\Internal\Admin

WCAdminUser::update_user_data_field()public staticWC 1.0

Helper to update user data fields.

Method of the class: WCAdminUser{}

No Hooks.

Return

null. Nothing.

Usage

$result = WCAdminUser::update_user_data_field( $user_id, $field, $value );
$user_id(int) (required)
User ID.
$field(string) (required)
Field name.
$value(mixed) (required)
Field value.

WCAdminUser::update_user_data_field() code WC 7.1.0

public static function update_user_data_field( $user_id, $field, $value ) {
	update_user_meta( $user_id, 'woocommerce_admin_' . $field, $value );
}