=== Softminal B2B Suite for WooCommerce – Wholesale Prices, B2B Store & Bulk Orders ===
Contributors: softminal
Tags: wholesale, b2b, wholesale pricing, woocommerce wholesale, bulk order
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.3.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.txt

Turn WooCommerce into a real B2B & wholesale store: group pricing, hidden prices, trade sign-up, quantity rules, quotes & a bulk order form.

== Description ==

[Features](https://b2bsuitewp.com) | [Documentation](https://b2bsuitewp.com/docs) | [Blog](https://b2bsuitewp.com/blog) | [Get Support](https://support.softminal.com)

**The all-in-one WooCommerce wholesale plugin and B2B plugin.** Set wholesale pricing for each customer group, hide prices until buyers sign up, approve trade accounts, enforce a minimum order quantity (MOQ) and pack sizes, take quote requests, and give buyers a fast bulk order form — all from one plugin, with no scattered add-ons.

Softminal B2B Suite is built around a **single pricing pipeline**, so every discount, hidden price and quantity rule is resolved one way. That means your B2B pricing is correct everywhere — the shop, the product page, the cart and the block checkout — with no surprise prices at checkout.

**Requires WooCommerce 8.0 or newer.** Softminal B2B Suite extends your existing WooCommerce store; it does not work on its own.

### 🎯 Why store owners choose Softminal B2B Suite

* **⚙️ One pricing engine, always correct** — every price flows through a single resolver, so wholesale and B2B prices match on the shop, product page, cart and block checkout. No conflicting filters, no checkout surprises.
* **🧩 Everything in one plugin** — one WooCommerce wholesale plugin and B2B plugin that covers pricing, hidden prices, trade registration, company accounts, net terms, quotes, quantity rules and a bulk order form, instead of stitching five plugins together.
* **🔄 Switch without breaking your catalogue** — move your groups, customers and price rules over from B2BKing, Wholesale Suite or WholesaleX. Every import previews first, so you see exactly what will change before a single row is written.
* **💬 Free buyer messaging** — talk to trade customers from a unified Inbox in your admin, included at no cost.
* **🕑 24/7 priority support** — a real support team, available around the clock, with priority help so you're never stuck.
* **⚡ Modern & compatible** — HPOS-ready, works with the WooCommerce Cart & Checkout Blocks, and plays nicely with multilingual (WPML, Polylang) and multi-currency stores.
* **🛠️ Developer-friendly** — a clean REST API, signed webhooks and a documented hook surface for ERP, CRM and automation.

### 🚀 Key features

* **💲 Customer group pricing** — put buyers into groups and set percentage, amount-off or fixed prices per group, product, category, tag or quantity band.
* **🔒 Hidden prices / login to see prices** — hide prices and the add-to-cart button from guests, or require an approved trade account before wholesale pricing appears.
* **📝 Trade registration & approval** — a registration form with your own business fields (company, VAT/tax ID, phone, address), spam-guarded, with an approval queue and email notifications.
* **🏢 Company accounts** — give a business one shared account: several colleagues, roles for who can buy and who approves, and per-account spend limits.
* **💳 Net terms & credit** — offer pay-on-account at checkout, set a credit limit per company, and send statements and overdue reminders automatically.
* **🧾 Request a quote (RFQ)** — let buyers build a quote basket and negotiate; an accepted quote converts straight to an order.
* **📬 Buyer messaging** — customers message you from their account and you reply from one unified Inbox where general questions and quote negotiations live together, each thread flagged when it needs you. Basic buyer↔merchant messaging is free.
* **📦 Minimum order quantity (MOQ), maximum & pack quantities** — enforce a minimum order quantity per product, per category or order-wide, plus maximum and pack (step) sizes, shown clearly at the shop, cart and checkout.
* **⚡ Bulk order form** — a fast order pad your buyers can use to add many products at once, plus quick order by SKU or CSV.
* **🎁 Buy X, get Y** — reward bulk orders with free or discounted units, from a product or a category, as the same item, a different gift or the cheapest in the cart.
* **🔁 Reorder** — one-click "order again" from a past order.
* **🧮 Purchase order numbers** and an **ex/inc VAT price toggle** at checkout.
* **📄 PDF invoices** — generate clean PDF invoices, choose from ready-made and premium designs (with your own watermark and fonts), download from the order screen or My Account, and attach them to order emails automatically.
* **🇪🇺 Tax exemption & EU VAT (VIES)** — mark customers or groups tax-exempt and validate EU VAT numbers against VIES.
* **🚚 Role-gated payment & shipping** — show or hide payment gateways and shipping methods per group (for example, wholesale = pay on account only).
* **👁️ Private catalogue** — hide categories from selected groups across the shop, search and direct links for a members-only or hybrid store.
* **🧭 Safe-Preview migration** — import your customer groups, users and price rules from B2BKing, Wholesale Suite or WholesaleX. Every import runs as a preview first, nothing changes until you choose Import, the source plugin can stay switched off, and it's safe to run again.
* **🏪 Multivendor (Dokan)** — run B2B on a Dokan marketplace: vendor-scoped wholesale pricing, per-vendor invoices, marketplace trade registration and cross-vendor bulk ordering, with a "B2B Pricing" tab in each vendor's dashboard. Via the free **Softminal B2B for Dokan** add-on (requires Pro).
* **🔌 Developer-ready** — a REST API and signed outbound webhooks for ERP, CRM and automation.

Every price change flows through one resolver, so B2B pricing is correct on the shop, the product page, the cart and the block checkout alike. The plugin is HPOS-compatible and works with WooCommerce Cart & Checkout Blocks.

### 🏪 Multivendor marketplaces (Dokan)

Running a Dokan marketplace? The free **Softminal B2B for Dokan** bridge makes the whole suite vendor-aware: the marketplace owner sets wholesale pricing scoped to a vendor's catalogue, every multi-vendor order produces one invoice per vendor, the bulk order form shows which vendor sells each product, and each vendor gets a "B2B Pricing" tab in their Dokan dashboard to manage their own wholesale prices. The bridge is a free download unlocked by your Pro licence (it needs B2B Suite Pro and Dokan active).

### 🌍 Works with multilingual & multi-currency stores

Price, quantity and buy-X-get-Y rules apply across translations (WPML and Polylang). Softminal B2B Suite always works in your store's base currency and leaves conversion to your currency switcher, so prices stay correct when one is active.

### ⭐ Free vs Pro

The free plugin already gives you customer-group wholesale pricing, hidden prices, trade registration and approval, quantity rules, a bulk order form, buy-X-get-Y, reorder, PO numbers, the ex/inc VAT toggle and basic buyer messaging.

Advanced modules — **company accounts, net terms & credit, request-a-quote, category-level quantity rules, VIES VAT validation, private catalogue, role-gated methods, premium invoice designs and the webhooks API** — are part of the [Pro add-on](https://b2bsuitewp.com).

**🕑 24/7 priority support.** Questions never wait for business hours — our team is available around the clock, and Pro customers get priority responses. [Get support](https://support.softminal.com) any time.

WooCommerce is a trademark of Automattic Inc. Softminal B2B Suite for WooCommerce is an independent plugin developed by Softminal and is not affiliated with, endorsed by, or sponsored by Automattic or WooCommerce. The name is used only to indicate compatibility.

== Installation ==

1. Make sure WooCommerce 8.0 or newer is installed and active.
2. Upload the plugin to `/wp-content/plugins/`, or install it from the Plugins screen.
3. Activate **Softminal B2B Suite for WooCommerce**.
4. Follow the setup wizard to create your first customer group, pricing and registration page.

== Frequently Asked Questions ==

= Is Softminal B2B Suite free? =

Yes. The free plugin covers customer-group wholesale pricing, hidden prices, trade registration and approval, quantity rules, a bulk order form, buy-X-get-Y, reorder and basic buyer messaging. Advanced B2B features (company accounts, net terms, quotes, VIES VAT, webhooks and more) are in the Pro add-on.

= Can I set different wholesale prices for different customer groups? =

Yes. Create as many customer groups as you need (Wholesale, Distributor, VIP…) and set percentage, amount-off or fixed prices per group, product, category, tag or quantity band.

= Can I hide prices from visitors until they have a trade account? =

Yes. You can hide prices and the add-to-cart button from guests, and require an approved registration before a buyer sees trade pricing.

= Can I set a minimum order quantity (MOQ), maximum or pack (step) quantities? =

Yes. Enforce a minimum order quantity (MOQ), plus maximum and pack (step) quantities per product, per category or order-wide, with clear messages at the shop, cart and checkout.

= Does this work with the WooCommerce block cart and checkout? =

Yes. B2B pricing and quantity rules are enforced in both the classic checkout and the Cart & Checkout Blocks, through the Store API.

= Is it compatible with High-Performance Order Storage (HPOS)? =

Yes. All order access uses the WooCommerce order API, so the plugin is HPOS-compatible.

= Can I migrate from B2BKing, Wholesale Suite or WholesaleX? =

Yes. The Safe-Preview importer moves your customer groups, users and price rules across, and shows you a full preview before anything is written — so you can switch with confidence.

= Does it work on multilingual or multi-currency stores? =

Yes. Rules apply across WPML and Polylang translations. Softminal B2B Suite uses your store's base currency and lets your currency-switcher plugin convert prices for display.

== Advanced use ==

Softminal B2B Suite is built to be extended, so developers can wire it into other systems and change its behaviour without editing the plugin.

**REST API.** Read customer groups, resolved prices and customers over the WordPress REST API, authenticated with application passwords. The Pro add-on adds endpoints for companies, credit, quotes and tax/VIES, all under the `smb2b/v1` namespace with proper capability checks.

**Webhooks.** Signed outbound webhooks (HMAC-SHA256, sent as an `X-SMB2B-Signature` header) fire on key events — a new trade registration, a submitted quote, an order awaiting approval, and an overdue invoice — so you can push data into an ERP, CRM or automation tool. Every delivery is logged and can be re-tested. (Webhooks are part of the Pro add-on.)

**Action & filter hooks.** A documented, stable hook surface lets you change behaviour cleanly. For example:

* `smb2b_resolved_price` — override the final resolved price for any product and buyer.
* `smb2b_registration_fields` — add, remove or reorder the business fields on the registration form.
* `smb2b_registration_approved` / `smb2b_registration_submitted` — run your own code when an application is approved or received.
* `smb2b_hide_prices` / `smb2b_hidden_price_message` — control when prices are hidden and what guests see.
* `smb2b_invoice_data` / `smb2b_invoice_templates` — customise invoice content or register your own PDF designs.

Core hooks use the `smb2b_` prefix; Pro hooks use `smb2bpro_`. The full hook reference, REST API details and setup guides are in the [developer documentation](https://b2bsuitewp.com/docs).

== Screenshots ==

1. B2B dashboard — 30-day sales, top buyers, customers by group and one-click quick actions.
2. Customer groups — organise trade buyers into groups such as Wholesale, Distributor or VIP.
3. Price rules — percentage, amount-off or fixed prices per group, product, category, tag or quantity band.
4. Check a price — see exactly which rule applies to any customer and product, and why.
5. Order quantity rules — minimum, maximum and pack quantities enforced across shop, cart and checkout.
6. Buy X, get Y — reward bulk orders with free or discounted units, added to the cart automatically.
7. Customers — assign buyers to groups and review their orders and total spend.
8. Trade registration form — a signup form with your own business fields: company, VAT/tax ID, phone and address.
9. Approval queue — new trade applications wait here until you approve or reject them; nobody gets B2B pricing until approved.
10. Bulk order form — a fast order pad for buyers, plus quick order by SKU or CSV.
11. PDF invoices — choose from ready-made invoice designs and attach them to order emails.
12. Hidden prices — require an approved trade account before prices and add-to-cart appear.
13. Buyer messaging — answer customers from one unified Inbox; unread conversations are flagged in the menu and in the thread list, so nothing waiting on you is missed.
14. Request a quote — review a buyer's request, send line-price offers with an expiry, and negotiate in the attached conversation; new requests are badged "New".

== Changelog ==

= 1.3.2 =
* New: Multivendor support for Dokan marketplaces via the free Softminal B2B for Dokan add-on (requires Pro) — vendor-scoped wholesale pricing, per-vendor invoices, marketplace trade registration, cross-vendor bulk ordering, and a "B2B Pricing" tab in each vendor's dashboard.
* New: a "Vendor" scope in the Price Rules and Quantity Rules screens when the Dokan add-on is active, so you can price a whole vendor's catalogue at once.
* New: Site Health check for email deliverability — flags when no SMTP service is configured so your invoices, approvals and quotes actually reach buyers.
* Improved: PDF invoices now render non-Latin currency symbols (for example the Bengali Taka) correctly instead of a "?".
* Improved: the invoice PDF is now attached to the "order received" (processing) email by default, not only the completed-order email — useful for buyers paying on account.
* Improved: the "which price wins" guide on the Price Rules screen is now a compact info tooltip, plus dark-mode polish across the rule screens.
* Developer: new hooks for vendor-aware pricing and rule scopes; a small database update (rule-ownership columns), applied automatically.

= 1.3.1 =
* New: Search box on the Applications screen — find a pending registration by name or email.
* Fixed: the "auto-approve new registrations" setting now works — matching applicants are approved automatically and sent their set-password email.
* Fixed: editing a company member's role no longer clears their spending limits.
* Improved: editing a company no longer drops saved billing details such as address, city, postcode and phone.
* Improved: customer search now matches names and emails containing "%" or "_" literally.

= 1.3.0 =
* New: Buyer messaging — customers can message you from their account, and you answer from a new Inbox in the admin. Basic buyer↔merchant messaging is free.
* New: One Inbox for everything — general questions and quote negotiations now live together, each thread flagged when it needs your reply.
* New: Turn a conversation into a quote (Pro) — one click converts a buyer's question into a draft quote, carrying the whole chat across.
* New: Pages settings tab — copy every storefront shortcode ([smb2b_registration], [smb2b_bulk_order], [smb2b_messages], [smb2b_quotes]) from one place.
* New: Storefront accent colour now matches your theme automatically (Settings → Bulk order form), or set your own.
* Improved: the bulk order form uses numbered pagination.
* Improved: the messages Inbox loads more conversations as you scroll, and you can delete a thread.
* Improved: quote requests waiting on you show a "New" badge; draft, declined and expired quotes can be deleted.
* Fixed: several storefront and admin polish issues — message-centre button visibility, the quote centre for shop managers, the import results table, and dark-mode readability in dropdown menus and notifications.

= 1.2.0 =
* New: Shared purchase lists (Pro) — share a saved list with your company so colleagues can load and reorder it; only the owner can edit it.
* New: View shop as… — preview your storefront as any customer, a customer group, or a logged-out guest straight from the admin bar. The preview follows you from page to page and shows exactly their prices, catalogue and payment options.
* New: Quantity-discount progress bar (Pro) — "Add N more to pay X each" on product pages, based on what is already in the cart.
* New: You can now turn the Ex/Inc VAT price switch off (Settings → General).
* Improved: your quote history is paginated.
* Fixed: bulk ordering grids and discount tables now follow your tax display setting, so prices always match the product price shown beside them.
* Fixed: privately hidden variations no longer appear in the bulk ordering grid.
* Fixed: clearer reasons when a grid line cannot be added because of quantity limits.

= 1.1.0 =
* New: A simple table to order multiple sizes and colors at once. Copy-paste directly from Excel and add everything to your cart in one click.
* New: Quantity discount tables now update automatically when customers select different options.
* New: Order Approvals — easily review, approve, or reject orders held by spending limits right from your dashboard.
* New: Quote Notifications — email alerts now send automatically when new quote messages arrive, and pending quotes are clearly flagged for your reply.
* Fixed: Pending-quotes counter always displayed zero.

= 1.0.1 =
* Fixed: registration setup text referred to a non-existent editor block — the registration form is added with the `[smb2b_registration]` shortcode.
* Fixed: minor paragraph spacing in the admin screens.

= 1.0.0 =
* Initial release: customer-group pricing, hidden prices, trade registration and approval, quantity rules, bulk order form, buy-X-get-Y, reorder, PO numbers and an ex/inc VAT toggle.

== Upgrade Notice ==

= 1.3.2 =
Adds Dokan multivendor support (via the free Softminal B2B for Dokan add-on), fixes PDF invoice rendering of non-Latin currencies, attaches the invoice to the order-received email, and adds an email-deliverability (SMTP) check. Includes a small database update, applied automatically.

= 1.3.1 =
Maintenance release: auto-approve registrations now works, an Applications search box, and fixes that preserve company member limits and billing details on edit.

= 1.3.0 =
Adds buyer messaging and a unified Inbox, one-click convert-to-quote (Pro), a Pages shortcode reference, and theme-matched storefront colour. Includes a small database update, applied automatically.

= 1.2.0 =
Adds shared company purchase lists, the View-shop-as preview, a quantity-discount progress bar and tax-display fixes. Includes a small database update, applied automatically.

= 1.1.0 =
Adds the Bulk Ordering Grid (Pro), Variation Price Breaks, an Order Approvals page and quote notifications. Safe update; no data changes.

= 1.0.0 =
Initial release.
