WordPress at Your Fingertips
function is not described

WC_Tracker::get_user_counts() private WC 1.0

Get user totals based on user role.

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

No Hooks.

Return

Array.

Usage

$result = WC_Tracker::get_user_counts();

Code of WC_Tracker::get_user_counts() WC 5.9.0

private static function get_user_counts() {
	$user_count          = array();
	$user_count_data     = count_users();
	$user_count['total'] = $user_count_data['total_users'];

	// Get user count based on user role.
	foreach ( $user_count_data['avail_roles'] as $role => $count ) {
		$user_count[ $role ] = $count;
	}

	return $user_count;
}