wc_current_user_has_role( string $role )

Checks if the current user has a role.


Description Description


Parameters Parameters

$role

(Required) The role.


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: includes/wc-user-functions.php

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


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.