WooCommerce price based on user role
One of my clients needed different product prices for their users based on their role. His website included a user role for resellers who have to see lower prices than default customers. To modify the price based on the user role I needed 2 things to know: How to check the current user’s role? What […]
WordPress user has role
In some situations it is very helpful to know whether a WordPress user has a specific role (or not). For example to show a different sidebar based on the user’s role or add a discount to the cart total when the current user is a reseller of your products and you want to give him […]