Role Based Pricing Extension
WooCommerce · Custom WooCommerce Extension
Show wholesale, retail, and VIP customers their own prices, with no change to the WooCommerce core.
THE PROBLEM
A store served both businesses and regular shoppers and needed different prices for each. Wholesale buyers, retail customers, and VIP members each had their own rate, but the team did not want to fork WooCommerce or run a heavy membership suite to get there.
I built a small extension that hangs off WordPress user roles, so pricing stays simple and the core stays untouched.
HOW IT WORKS
- Reads the signed in user role on every price calculation
- Applies the matching price tier across the shop, product, and cart pages
- Hooks the WooCommerce price filters instead of editing core, so updates stay safe
- Falls back to the standard price for logged out visitors
- An admin screen maps each role to a pricing tier
RESULTS
- One catalog now serves three customer types without duplicate products
- Survived WooCommerce updates because nothing in core was touched
WHAT I’D DO DIFFERENTLY
I would memoize the tier lookup per request. Resolving the role and tier on every price render is cheap, but on a large cart it repeats more than it needs to, and caching it once per page would tidy that up.
Need a plugin like this?
I build custom WordPress and WooCommerce plugins that solve the exact problem off the shelf tools miss. Tell me what you are wrestling with.
START A CONVERSATION