How to limit functionality of a woocommerce plugin to only certain user role?
Usually, you would not check the user role, but the user’s capabilities via current_user_can, and use a plugin such as User Role Editor to add the custom capabilities to certain roles. This is much more flexible to use in the long term, see Roles and capabilities (for example, do you want your wordpress admin user … Read more