PPS Lightweight B2B Prices for WooCommerce: settings reference

Updated November 10, 2026

Use this reference to configure Free and Pro 1.1.2. Pro is a separate add-on and requires WooCommerce, the active Free plugin and paid entitlement.

Release in preparation. Downloads and checkout are not open yet.

Where to configure it

Global settings

Open WooCommerce > Settings > B2B Prices and save changes through WooCommerce's settings form. Free values live in pps_lb2b_options; the suffixes below identify its keys.

Control / key Default Accepted input, save and effect
Enable B2B Pricing / enabled No Checkbox yes/no; stops wholesale storefront pricing and Pro restrictions when off. Owned cart prices are restored on the next totals pass, not immediately on saving this option. Registration, approval, role tools and authorized Pro editors/CSV maintenance remain available.
Wholesale Role / role wholesale_customer Selector of installed roles. Sanitized role key; missing role falls back to wholesale_customer with an error. Create that role before assigning it.
Second Wholesale Role / role_2 None / blank Same role choices plus None; nonexistent saved selection is cleared. Either selected role qualifies a logged-in user.
Global Discount (%) / discount_percent 0 Numeric, step 0.01; server clamps to 0-100 and reports out-of-range input.
Discount Basis / discount_basis Regular price only regular_only or active_price; invalid becomes regular_only. Regular uses the raw regular price; active uses the active/sale price as the percentage base.
Price Display Mode / display_mode Show both: Regular + Wholesale both or wholesale_only; invalid becomes both. The source adds a label/badge to existing price HTML; it does not independently construct a guaranteed pair of regular/wholesale prices.
Wholesale Label / wholesale_label Wholesale Plain text, including a saved blank. Shown with wholesale price HTML.
Disable Coupons for Wholesale / disable_coupons No Checkbox yes/no; disables WooCommerce coupon availability for qualifying users while Free pricing is initialized.
Require Admin Approval for B2B Registrations / require_approval No Checkbox yes/no. New shortcode registrations remain ordinary customers with Pending status until approved; existing users are not retroactively changed.

The source's extra wholesale_role saved key is a compatibility value, not another visible role selector. Qualification uses the selected role(s), not the B2B Status display alone. Full-page caches must not reuse wholesale HTML for retail visitors. The plugin sets a no-page-cache constant for wholesale page requests, but cache configuration still needs independent testing.

Create a role

The same settings page has Role slug: (pps_lb2b_new_role_slug, default wholesale_customer) and Display name: (pps_lb2b_new_role_name, default Wholesale Customer). Create Role checks its nonce and manage_woocommerce, sanitizes the slug as a key, rejects blank/duplicate slugs and derives a title from the slug if the name is blank. The new role copies Customer capabilities, or read-only capability if Customer is missing. It is not deleted on deactivation. Creating it does not assign users or select it automatically.

B2B registration and approval

The Free shortcode [pps_lb2b_register] has no supported configuration attributes. It shows six initially blank required fields:

Field / submitted name Save and validation
First name / first_name Required plain text; also saved as billing first name.
Last name / last_name Required plain text; also saved as billing last name.
Email address / email Required valid email, must not already exist; used as username/email and billing email.
Password / password Required nonempty password passed to WordPress account creation. No plugin-specific strength rule is enforced here.
Company name / company Required plain text, saved as billing_company.
VAT ID / vat_id Required plain text, saved as _billing_vat. Registration does not call VIES or validate a tax exemption.

Register verifies the registration nonce and creates the user. There is no automatic sign-in. With approval off, it assigns the primary wholesale role and Approved status. With approval on, it assigns Customer and Pending. Logged-in visitors see a logout instruction rather than this form.

In Users, the B2B Status column shows Pending, Approved or N/A. Approve checks a record-specific nonce and edit_users, then replaces the user's role with the current primary wholesale role and marks Approved. There is no plugin reject/revoke/bulk approval control. Despite the pending-form wording, no approval notification email is sent in this handler. Do not use approval if the selected qualifying role is Customer, since pending registrations already receive Customer.

Pro settings on B2B Prices

These are separate pps_lb2b_pro_options keys saved by the Pro settings callback, which rebuilds the option array. Paid storefront behavior also requires Enable B2B Pricing and a qualifying wholesale role. Settings and editors require their normal capabilities plus paid entitlement; maintenance is still available while the storefront switch is off.

Control / key Default Save and runtime behavior
Tax-Exempt Wholesale / tax_exempt No Checkbox yes/no; marks qualifying WooCommerce customers VAT-exempt, regardless of whether a VAT number was validated. This records a store configuration, not a determination of tax entitlement.
Minimum Order Amount / min_order_amount 0 Float clamped at 0; store currency. Positive values compare with cart subtotal, not shipping-inclusive final total.
Minimum Order Quantity / min_order_qty 0 Integer clamped at 0. Positive values compare with total cart item quantity, not distinct product count.
Show Tier Pricing Table / show_tier_table Yes Checkbox yes/no; single-product table for wholesale users when that product has tiers. Does not enable/disable tier price calculation.
Tier Table Title / tier_table_title Quantity Discounts Plain text.
Allowed payment gateways / allowed_gateways Empty, allow all Multiselect of installed gateway IDs; sanitized keys. Nonempty selection removes other available gateways for wholesale frontend checkout. It cannot make an unavailable gateway available.
Hidden shipping methods / hidden_shipping Blank Comma-separated method IDs such as flat_rate or rate IDs such as flat_rate:3. Trimmed strings; exact matches are removed. Hiding every rate leaves no shipping rate.
VAT number field at checkout / vat_field No Checkbox yes/no; adds the optional classic-checkout field for wholesale users and storage hooks.
Validate VAT numbers (VIES) / vat_validate No Checkbox yes/no; used only while the VAT-field module is active. Blank numbers are not validated.
Wholesale price suffix / price_suffix Blank Plain text appended to qualifying frontend price HTML. A suffix such as ex. VAT does not itself change tax calculations.

Pro catalog controls

These two controls share the B2B Prices page but keep their existing pps_lb2b_options keys. They are Pro-owned, not Free price-hiding features. Stored values remain dormant without Pro entitlement.

Control / key Default Save and runtime behavior
Hide prices for non-B2B users / hide_prices_non_b2b No Pro checkbox yes/no. With pricing enabled, replaces frontend price HTML and makes products/variations non-purchasable for guests and retail users in the inspected hooks. It does not promise to conceal every feed/API/template price.
Hidden price replacement text / hide_prices_text Login to view B2B prices Pro plain text, escaped when used instead of price HTML.

Positive minimums produce WooCommerce cart errors and a product-page requirements notice. Both requirements apply when both are set. These hooks do not establish Checkout Block compatibility.

The optional checkout VAT number (pps_lb2b_vat_number) defaults to previously saved user metadata, otherwise blank. It is sanitized text saved to user and order metadata and displayed on admin orders. This is a different key from the registration VAT ID, so registration does not automatically prefill it. VIES checking strips punctuation, uppercases the value and splits the first two letters as country code. Invalid results block checkout; remote failures/indeterminate responses allow it. Results are cached for one day.

Pro product and variation editors

On a product, B2B Wholesale Pricing supplies:

Field / submitted key Default and save
Override Type / pps_lb2b_override_type Use global discount (none); choices none, percent, fixed. Invalid becomes none.
Discount % / pps_lb2b_product_discount Blank; shown for percent. Numeric, clamped 0-100; blank deletes the metadata.
Wholesale Price / pps_lb2b_fixed_price Blank; shown for fixed. Nonnegative store-currency number, step 0.01; blank/negative deletes it. Zero is a valid fixed price.

These saves require the product nonce and edit-product permission and skip autosaves. Hidden values still submit and save; Override Type decides which is used.

Each WooCommerce variation has B2B Override (pps_lb2b_var_override_type[i], default none / Use global/product discount), Discount % (pps_lb2b_var_discount[i], blank) and Fixed Price (pps_lb2b_var_fixed[i], blank). The same choices and percentage clamp apply; a negative variation fixed value is clamped to zero, unlike the product-level deletion behavior. Blank numeric fields delete their metadata. These run in the WooCommerce variation-save flow. A variation with no override inherits its parent override.

Quantity tier repeater

B2B Quantity Pricing Tiers begins empty. + Add Tier appends a row; the remove control drops it. Save/update the product to persist changes.

pps_lb2b_tiers[i] key New-row default Save/runtime meaning
min_qty, Min Qty Blank Absolute integer at least 1; smaller/empty values discard the row. Inclusive lower bound.
max_qty, Max Qty Blank Blank means unlimited; absolute integer otherwise. Values below min are raised to min. Inclusive upper bound.
type, Type Discount % / percent percent or fixed; invalid becomes percent.
value, Value Blank Float, blank becomes 0. Percent clamps 0-100; fixed clamps at 0 and is the unit price in store currency.

The handler checks its nonce and edit-product permission, sorts rows by minimum and removes the metadata if none remain. When ranges overlap, the last matching sorted row wins. Quantity is aggregated across cart lines and variations sharing the same parent. Percentage tiers use each item's raw regular price, not its sale or already-discounted price. A matched tier overrides fixed and ordinary percentage cart pricing. There is no per-variation tier repeater.

Product categories and precedence

Products > Categories add/edit screens have B2B discount (%) (pps_lb2b_category_discount), blank by default, step 0.01. Blank removes term metadata; nonblank saves a float clamped 0-100 under the category-save flow with manage_product_terms. Among directly assigned categories, the largest saved category discount wins, including a saved 0; variations use their parent's categories.

Pricing falls through from a qualifying quantity tier to a product/variation override, then the highest category percentage, then the global percentage. Category percentages run before product percentages, so the product override wins. A variation's own percentage suppresses an inherited fixed price. Fixed zero remains valid. Percentage tiers use raw regular price; ordinary percentages use Discount Basis.

Every totals pass first restores this plugin's previous owned product-object prices, then recalculates Free percentages, fixed prices and tiers in that order. Losing a tier, role, master enable or paid entitlement does not keep an old tier/fixed price after that pass. Tier cache entries belong to the actual cart object, not another object with the same product ID. A different raw value written by another extension is left alone; identical-valued writes cannot be distinguished. This request-local ownership rule is not compatibility proof for other pricing extensions or Blocks.

How the discount basis affects cart prices

With Discount Basis set to Active price (active_price), ordinary percentage pricing uses a numeric sale price when present, otherwise the regular price. If the final resolved percentage is exactly 0%, Free leaves the current cart price alone after restoring any price it still owns from the previous totals pass. This uses the resolved rule, including category, product and extension adjustments, not just Global Discount. It also applies when the catalog basis is zero.

Regular price only (regular_only) deliberately writes a price based on the regular catalog price, even at 0%. A positive discount still writes its result if currency rounding produces the same number as the basis; a displayed tie is not a zero-percent rule. Pro's separately authorized fixed wholesale price of 0 remains valid and is still applied. A matching quantity tier can replace the fixed price.

Pro quick order

Use [pps_lb2b_quick_order] for qualifying logged-in wholesale users. There is no actual Enable Quick Order Table setting in Pro; the disabled Free preview is not an enable switch.

Search by SKU or product name starts at two characters and returns up to 10 purchasable in-stock results, excluding variable parent products. Select a concrete variation by SKU. Selecting a result adds an unsaved table row with Qty 1, a whole-number quantity input and a remove button. Duplicate selections do not add another row. Add everything to cart submits up to 50 rows, normalizes quantities to at least 1 and uses WooCommerce add-to-cart validation. Partial success clears the displayed selection, so check the cart rather than assuming every row was added. View cart is navigation.

Rendering, search and bulk add all require the wholesale role, master enable and live paid entitlement. AJAX also checks its nonce. Legacy everyone="yes" and the old public-access option do not grant access; there is no supported public Quick Order mode. Variation additions use both parent and variation IDs. These source checks do not establish full browser/cart compatibility.

Pro price CSV

WooCommerce > B2B Price CSV requires manage_woocommerce. Export prices (CSV) exports published products and their child variations in columns product_id, sku, name, override_type, fixed_price, discount. It does not export tiers, categories, customers or global settings.

The Import form has a required blank CSV file picker (pps_lb2b_csv) and Import prices. It requires paid entitlement, manage_woocommerce, the import nonce, a valid upload and permission to edit each product. The header must exactly match the six exported columns in order; up to 5,000 data rows are processed. Positive product ID takes precedence; SKU is used only with blank/zero ID, not when a nonzero ID is wrong. Name is ignored.

Each row must have six columns and validate completely before any metadata write. Override type is percent, fixed or empty; legacy discount becomes percent and none becomes empty. Fixed requires a finite nonnegative price; percent requires a finite 0-100 percentage. Both numeric columns must be valid when nonblank, even if inactive for that row. Empty type removes all three override values. Valid zero prices and variation IDs are supported. Malformed, nonfinite, negative or out-of-range rows are skipped without changing metadata. Export writes canonical percent, so percentage round-trips no longer need a label workaround. Import remains row-by-row with no dry-run, all-file transaction or undo. Keep an export and database backup first; browser upload/full HTTP streaming remain unverified.

Troubleshooting

Both-eligible B2B plus Volume Pricing remains unsupported. Use one pricing engine at a time for the same cart items. No stacking or precedence policy is supported for that combination.

For missing wholesale prices, confirm the role exists, the user's actual roles match and pricing is enabled. Check regular/sale bases, variation inheritance, category precedence and matching tiers. Logged-in role-specific cache behavior must be tested separately.

Disable or roll back safely

Turn off Enable B2B Pricing to stop storefront wholesale prices and paid restrictions. Previously owned cart mutations restore on the next totals pass; a save alone does not immediately recalculate an open cart. Authorized editors/settings/CSV maintenance remain available. Registration and approval also remain active with Free; remove the registration shortcode or deactivate Free to stop that form. Review ordinary cart prices before reopening traffic. Deactivation does not revert assigned roles, users, saved overrides, orders or CSV copies.

Services and data

Options, product/category overrides, user profiles and order VAT values are stored in WordPress/WooCommerce. Registration and approval handlers do not send the promised approval notification. Enabling VIES sends the submitted VAT number/country to the European Commission endpoint with an eight-second timeout. Tax exemption is independent of that check. No other feature-specific external service was found in these paths; hosting, payment gateways and Freemius licensing are separate. This documentation offers no tax, legal, privacy or security certification.

Related documentation

Setup: https://propluginstack.com/docs/lightweight-b2b-prices-setup-reference/

Source changelog: https://propluginstack.com/changelog/lightweight-b2b-prices-source-changelog/