WordPress at a glance
function is not described

Automattic\WooCommerce\Admin

Loader::user_can_analytics() public WC 1.0

Deprecated from version 2.1.0. It is no longer supported and can be removed in future releases. Use current_user_can( 'view_woocommerce_reports' ) instead.

Helper function indicating whether the current user has the required analytics capability.

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

No Hooks.

Return

true|false. Nothing.

Usage

$result = Loader::user_can_analytics();

Changelog

Deprecated Since 2.1.0 , use current_user_can( 'view_woocommerce_reports' )

Code of Loader::user_can_analytics() WC 5.3.0

<?php
public static function user_can_analytics() {
	return current_user_can( static::get_analytics_capability() );
}