HDM B2B Pricing
WordPress B2B pricing plugin
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/thebrainwavezzz/hdm-b2b-pricing/archive/refs/heads/main.zipReadme
HDM B2B Pricing
HDM B2B Pricing provides fail-closed B2B pricing for a controlled WooCommerce dealer pilot.
Release candidate: 1.0.0-rc.1
V1 scope
V1 supports:
- WooCommerce Simple Products only;
- Classic Cart and Checkout;
- WooCommerce Cart and Checkout Blocks;
- the
b2b_customerrole; - Silver, Gold, Platinum and VIP reseller tiers;
- legacy B2B net pricing with optional quantity discounts;
- reseller-tier pricing;
- guest price display modes;
- an administrator-only Pricing Inspector; and
- B2B payment-term assignment and BACS presentation.
Variable, grouped, external, bundle, composite, subscription and every other non-simple product type are outside V1. The pilot catalog and purchasing paths must prevent B2B customers from purchasing those product types.
Requirements and tested platform
- WordPress 6.5 or later
- PHP 7.4 or later
- WooCommerce 10.8 or later
- Tested WooCommerce version: 10.8.1
Compatibility beyond the recorded staging environment is not claimed.
Pricing modes
Legacy mode
Each supported product uses one positive B2B net price. Up to two optional quantity thresholds can apply percentage discounts. Invalid or incomplete optional quantity rules are ignored. A missing or invalid base price makes the price unavailable.
Tiered mode
Each dealer uses the exact configured positive price for their assigned tier: Silver, Gold, Platinum or VIP. There is no fallback to another tier, the legacy price, the WooCommerce regular price or the WooCommerce sale price. A missing or invalid assigned-tier price makes the price unavailable.
Fail-closed cart and checkout behavior
For a B2B customer and a supported Simple Product:
- the resolver supplies the current price using the current quantity and tier;
- an unavailable price is neutralized on the in-memory cart product to prevent a retail or sale price from becoming the cart price;
- direct add-to-cart requests are rejected when no valid B2B price exists;
- Classic cart and checkout validation reject unavailable lines;
- Store API checkout validation rejects unavailable lines independently;
- mixed carts remain invalid while any supported line is unavailable; and
- removing the invalid line allows totals and checkout to recover.
The neutralized zero is not a commercial price. Server-side validation must remain active; JavaScript and CSS provide presentation only.
Cart and Checkout Blocks
The plugin registers WooCommerce Blocks integration assets and namespaced Store API extension data. The extension reports only availability status and a customer-facing message. It does not return B2B prices, tier metadata, resolver diagnostics, pricing sources, payment terms or other user-specific commercial data.
If the Blocks JavaScript or CSS fails, server-side Store API validation remains the checkout enforcement boundary.
Guest display modes
hidden: suppress storefront price HTML for guests.retail_only: show normal WooCommerce retail price HTML.login_message: suppress price HTML and show a login/request prompt on product pages.
Retail and recommended retail prices are public information for V1. These display modes are storefront presentation choices, not an API-confidentiality layer. B2B prices and internal commercial metadata remain confidential.
Guests cannot purchase while this plugin is active.
Pricing Inspector
When enabled, users with manage_woocommerce can inspect pricing diagnostics
on product pages. It must be disabled for the production pilot.
User configuration
A pilot dealer must have:
- the
b2b_customerrole; - a valid reseller tier when tiered mode is active; and
- an intended payment term: Prepayment, Net 14 days or Net 30 days.
The B2B role is created when the plugin is activated. WooCommerce management capabilities do not by themselves grant storefront B2B pricing.
Known V1 limitations
- Only Simple Products are supported.
- Product-type scope is enforced operationally in the pilot catalog; the plugin does not add support for or globally disable other product types.
- The product price box states
Prices excl. VAT; the pilot configuration must use and verify tax-exclusive B2B presentation. - Retail users do not receive the BACS gateway through this plugin.
- There is no CSV importer.
- There is no automatic tier fallback.
- There is no configurable VAT-display feature.
- Public WooCommerce product APIs may expose normal retail storefront data.
Release installation
- Back up the database and preserve the previous known-good plugin archive.
- Record the release commit SHA, archive filename and SHA-256 checksum.
- Install the exact release archive on staging.
- Confirm WordPress reports version
1.0.0-rc.1. - Run the release smoke tests in RELEASE.md.
- Rehearse rollback and cache purging on staging.
- Install the same verified archive for the restricted pilot.
- Purge application, object, page and CDN caches.
- Repeat the production smoke checks before admitting pilot orders.
Do not build a new archive between staging approval and pilot deployment.
Rollback
- Stop new pilot checkout traffic.
- Restore the previous known-good plugin archive.
- Restore the database backup only when the deployment changed data or the rollback owner determines it is required.
- Purge application, object, page and CDN caches.
- Verify retail checkout and one known-good B2B cart.
- Record the rollback time, owner, archive checksum and result.
Detailed release records and test evidence belong in RELEASE.md.
License
Internal HDM development.