WordPress at a glance
function is not described

wc_maybe_store_user_agent() WC 3.0.0

Store user agents. Used for tracker.

No Hooks.

Return

null. Nothing.

Usage

wc_maybe_store_user_agent( $user_login, $user );
$user_login(string) (required)
User login.
$user(int|object) (required)
User.

Changelog

Since 3.0.0 Introduced.

Code of wc_maybe_store_user_agent() WC 5.3.0

<?php
function wc_maybe_store_user_agent( $user_login, $user ) {
	if ( 'yes' === get_option( 'woocommerce_allow_tracking', 'no' ) && user_can( $user, 'manage_woocommerce' ) ) {
		$admin_user_agents   = array_filter( (array) get_option( 'woocommerce_tracker_ua', array() ) );
		$admin_user_agents[] = wc_get_user_agent();
		update_option( 'woocommerce_tracker_ua', array_unique( $admin_user_agents ) );
	}
}