WordPress at a glance
function is not described

wc_shop_manager_has_capability() WC 3.5.4

Safe way of allowing shop managers restricted capabilities that will remove access to the capabilities if WooCommerce is deactivated.

No Hooks.

Return

true|false[]. Nothing.

Usage

wc_shop_manager_has_capability( $allcaps, $caps, $args, $user );
$allcaps(true|false[]) (required)
Array of key/value pairs where keys represent a capability name and boolean values represent whether the user has that capability.
$caps(string[]) (required)
Required primitive capabilities for the requested capability.
$args(array) (required)
Arguments that accompany the requested capability check.
$user(WP_User) (required)
The user object.

Changelog

Since 3.5.4 Introduced.

Code of wc_shop_manager_has_capability() WC 5.2.2

<?php
function wc_shop_manager_has_capability( $allcaps, $caps, $args, $user ) {

	if ( wc_user_has_role( $user, 'shop_manager' ) ) {
		// @see wc_modify_map_meta_cap, which limits editing to customers.
		$allcaps['edit_users'] = true;
	}

	return $allcaps;
}