Notice: WC_Cart::get_cart_url is deprecated since version 2.5! Use wc_get_cart_url instead. in /home/webpilla/puneetk.com/wp-includes/functions.php on line 3928
Select Page

How to check if a user is in a specific role in WordPress?

To get user roles of currently logged in user and match it against a specific user role.