wc_current_user_has_role()
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() 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 ); }