In wordpress with WooCommerce, I’m looking to display a different price based on a user role (wholesaler, dealer, etc) AND based on the category.
There’s a dynamic pricing plugin that displays these discounts once an item is added to the cart, but not on the page itself.
Is there a way to use a filter or action to check for the user level, check the item’s category and then change the price dynamically?
Yes there is, you can use the
woocommerce_get_price
filter hook to filter the value based on user role and return a price accordingly e.g:You can try out Customer Specific Pricing for WooCommerce. With this plugin, you can add different prices for registered users.
Currently the plugin is in its initial phase, but there would be updates soon to support additional features like price based on product category.