
Automating Role-Based Wholesale Pricing in WordPress
I built this plugin to solve a common WooCommerce problem: wholesale logic usually lives in spreadsheets, email threads, and manual exceptions instead of the store itself. With NEXU B2B Wholesale for WooCommerce , I wanted WordPress to enforce B2B rules automatically. The core idea is simple: assign a buyer role, then let pricing, product visibility, order minimums, and payment flow react to that role. Under the hood, the plugin extends WooCommerce product and cart logic with role-aware conditions. On the product side, I attach wholesale pricing tiers and visibility rules to specific roles, so approved buyers see different prices and quantity discounts than retail visitors. For mixed catalogs, I also added per-product controls to hide price or disable add to cart for non-wholesale users. For onboarding, I built a registration and approval workflow that keeps wholesale pricing private until an admin approves the account. That means the role assignment is not just a label, it is the swit
Continue reading on Dev.to Webdev
Opens in a new tab

