wc_current_user_has_role()WC 1.0

Checks if the current user has a role.

No Hooks.

Return

true|false.

Usage

wc_current_user_has_role( $role );
$role(string) (required)
The role.

wc_current_user_has_role() code WC 9.4.2

function wc_current_user_has_role( $role ) {
	return wc_user_has_role( wp_get_current_user(), $role );
}