AI-generated WordPress plugin

Generate a WooCommerce wholesale tier pricing plugin

Wholesale pricing in WooCommerce is that feature where the public plugin you picked handles 80% of the cases and then the catalogue manager says "by the way, Distributor A gets a 30% discount on category X but only on orders over €500, and retailers in the EU get a different VAT treatment than non-EU". That 20% tail is where the generic plugin breaks down and your accountant starts filing exceptions by hand.

Generating a wholesale plugin from scratch lets you encode your exact price ladder. Role-based tiers, per-customer overrides stored in user meta, minimum order quantity rules per product, tax display per customer type — all of it is just code paths the plugin evaluates in calculate_totals(). You describe the rules, we write the logic.

5 min to ZIP 24 h live sandbox WP Coding Standards

Why generate it instead of installing an existing plugin?

B2BKing and Wholesale Suite are both mature, good plugins. They start at €100-150/year and pack extensive UIs, which is great if you need the full B2B experience: quote requests, invoice payments, purchase orders, etc. If your wholesale operation is simpler — "roles X, Y, Z get discounts A, B, C" — you are paying for a lot of surface area you will not use.

The configuration sprawl of those plugins (dozens of settings pages, sub-rules per role, per product, per category) becomes its own maintenance burden. Four years in, nobody on the team remembers why Role B had that one overridden rule on Category C. A generated plugin is a single file of rules, readable end to end.

If your wholesale rules live in a spreadsheet and change rarely, the generated plugin can literally read from a shortcode-configurable JSON or from a custom table that your ops team edits. Fewer admin pages, fewer surprises, smaller audit footprint.

Example prompt

This is the kind of description that generates this plugin. You can start from it and tweak whatever you need before hitting generate.

Plugin name: Acme B2B Pricing

User roles involved: "retailer" and "distributor" (register both on activation if missing).

Rules:
- retailer: -15% on all products regular_price.
- distributor: -25% on products in category "core", -30% on products in category "accessories", -15% on the rest.

Minimum order quantity per product:
- retailer: 10 units per product.
- distributor: no minimum.

Tax display:
- retailer: prices including VAT (21%).
- distributor: prices excluding VAT.

On add-to-cart: validate minimum quantity server-side. If below, block with a clear cart error.

Shortcode [acme_price_table sku="ABC123"] shows the current visitor's tier price + public price crossed out.

Admin page under WooCommerce > Settings > B2B:
- Rules table (role, category, discount %) editable.
- Per-customer override: search for a user, set a flat override discount (stored in user meta).

HPOS-compatible. No external dependencies.

What the generated plugin typically includes

  • Filter on woocommerce_product_get_price and _regular_price keyed by current user role
  • User meta override check with caching per request
  • Tax display filter via woocommerce_get_price_including_tax / excluding_tax
  • Minimum order quantity enforced in woocommerce_add_to_cart_validation
  • Shortcode renderer using esc_html + wc_price helpers
  • Admin settings page with AJAX user search for per-customer overrides
  • Activation hook that creates missing user roles

Quote requests, purchase orders, invoice payments, hidden catalogue, per-customer SKU lists — each is an additional feature you describe in the prompt.

Frequently asked questions

Will this work with a multi-currency plugin?

Yes, if the multi-currency plugin applies rate conversion through the woocommerce_product_get_price filter (most do, including CURCY and WPML Currency). The pricing plugin evaluates first, then the currency conversion applies. Mention which one you use.

How does it interact with WooCommerce coupons?

Coupons apply after wholesale pricing by default (so wholesale discount + coupon stack). If you want to prevent stacking, we add a filter that blocks coupons for certain roles. Either behaviour goes in the prompt.

Can the plugin hide products entirely from retail customers?

Yes. We filter by category or tag in pre_get_posts for shop archives and block direct URL access with a redirect. Tell us which roles see which catalogue.

Does it support quote requests (no instant checkout)?

We can replace the "Add to cart" button with "Request quote" for specific roles, create a "pending_quote" order status, and notify the sales team by email. Describe the workflow and the plugin builds it.

Ready to generate your plugin?

Create a free account, verify your email, first generation is on us.

Related:WooCommerceB2BPricingHPOS-ready