You know the bug before you’ve even opened the store. The product page says $12. The cart says $10.80. Checkout Blocks says something else entirely. And now it’s late, you’ve got six plugins active, and you’re grepping for woocommerce_product_get_price trying to work out which one fired last.
I’ve lost enough evenings to that exact thing that I stopped blaming the plugins. None of them is wrong, really. They’re just five strangers hooking the same filter, and the price a customer pays comes down to load order. That’s not a store. That’s a negotiation, and it’s happening live in front of someone with a credit card out.
We built Softminal B2B Suite for WooCommerce mostly to stop living like that. So instead of a feature tour, here’s what actually changed underneath — the three calls that decide whether a B2B plugin is safe on a store taking real money.
The setup that keeps breaking
Go look at the plugins page of pretty much any WooCommerce store selling to businesses. You’ll find some version of this:
wholesale pricing, a “hide price until login” thing, a plugin for registration fields, request-a-quote, min/max quantities, and something for invoices. Six add-ons. Each one solves its own slice fine. The trouble is none of them knows the others exist, and they’re all elbowing for the same price and visibility filters.
So the final price isn’t decided by a rule you can point at. It’s decided by whoever hooked in last. And when a buyer emails asking why their line came to $68.40, you honestly can’t tell them — because nothing in your store knows either. You’d be guessing along with them.
What we did instead
One resolver. Everything goes through it. That’s a rule we actually enforce on ourselves in the codebase — price mutation runs through a single Pricing\Resolver pipeline, and if you find a stray Woo price filter somewhere, that’s a bug to rip out, not a feature.
When someone looks at a product, the pipeline walks the options in a fixed order and stops at the first hit:
accepted quote
→ customer-specific rule
→ company rule
→ group rule
→ category / tag rule
→ sale price
→ regular price
Enter fullscreen mode Exit fullscreen mode
Nothing clever. The whole point is that it’s boring and it’s one path. The same walk answers the shop, the product page, the cart, the Store API that Checkout Blocks reads from, and the little “why this price” panel. There’s no second code path that can quietly disagree with the first.
And that second-order effect is the part I care about most. Because the explainer is generated from the same walk that charges the customer, it can’t drift. When a price panel recomputes the answer on its own, you’ve just written a second bug that’s going to disagree with the first one eventually. Ours literally can’t, because it’s the same code. So when that “why is this $68.40?” email lands, you pull up which rule won and which ones it skipped, and you answer it in ten seconds.
The postmeta trap
The other line we won’t cross: no B2B data in postmeta. Pricing rules, companies, quotes, credit — all of it lives in its own smb2b_ tables.
I get why people reach for postmeta. It’s right there, it’s easy, update_post_meta and you’re done. And then six months later the shop page is doing a meta_query join against a table with a few million rows and taking four seconds to paint, and nobody can figure out why.
B2B pricing is a relational problem wearing a shopping-cart costume. Customers belong to groups, groups own rules, rules target categories, companies carry a credit ledger. Model that in real indexed tables and pricing stays quick as the catalogue grows, a credit ledger is an actual append-only ledger you can query instead of a serialized blob, and uninstall.php can drop the whole thing cleanly instead of leaving junk scattered across wp_postmeta forever.
HPOS and Blocks aren’t a “later” thing
A B2B plugin lives at the checkout, which is the one part of WordPress that punishes you hardest for cutting corners. Two things there just aren’t negotiable for us.
All order access goes through WC_Order CRUD — never a direct query against wp_posts. If your plugin is still reading orders out of the posts table, it’s already broken on any store that’s flipped on HPOS, whether or not anyone’s noticed yet.
And every checkout-affecting feature has to work in classic checkout and Cart & Checkout Blocks, Store API included. “Works on classic” is half a plugin shipped as a whole one. A lot of the older B2B plugins predate both HPOS and Blocks and got patched forward — which means building on them today is inheriting all of that debt on day one.
What it actually gives you
None of the above matters to a store owner on its own — it matters because of what it lets the plugin do without falling over:
group and wholesale pricing (percentage, amount off, or fixed — shop-wide down to a single customer), hide prices until login, trade registration with an approval queue, company accounts with roles and spend limits and approval chains, net terms and credit on a real ledger, request-a-quote that turns an accepted quote into a real order at the agreed numbers, and a bulk order form for the fifty-line reorder by SKU or pasted CSV.
The free plugin on WordPress.org runs a full single-group wholesale channel end to end — it’s not a nagware trial. Pro stacks the organisational stuff on top (unlimited groups, companies, credit, quoting, EU VIES VAT validation, webhooks) on the same tables and the same resolver, so you install free first and add Pro whenever your buyers force the issue, without redoing anything.
If you’re evaluating one of these
Skip the feature grid for a minute. The questions that actually predict whether you’ll be up at 11pm are:
- Does one thing decide the price, or do several filters race for it?
- Can it explain a price using the same code that charged it?
- Is the B2B data in real tables, or smeared across postmeta?
- Does it work in Blocks and HPOS, or just classic?
Get those four right and honestly the features sort themselves out. Get them wrong and no feature list is going to save you.
Softminal B2B Suite is live on WordPress.org — free is a real wholesale channel on its own. b2bsuitewp.com.
Real B2B deserves better than a discount table. And a lot better than five of them stitched together.
답글 남기기
댓글을 달기 위해서는 로그인해야합니다.