
內容簡介
CatCode Conditional Shipping and Payment Rules for WooCommerce 外掛能夠根據顧客角色、國家和購物車金額等條件,靈活控制 WooCommerce 的運送方式和付款選項,提升購物體驗並減少不必要的選擇。
【主要功能】
• 根據顧客角色隱藏運送和付款選項
• 支援多種條件設定,靈活調整規則
• 優先順序執行規則,確保正確性
• 適用於經典和區塊結帳流程
• 自動更新運送費用快取
• 提供決策日誌,便於追蹤
外掛標籤
開發者團隊
② 後台搜尋「CatCode Conditional Shipping and Payment Rules for WooCommerce」→ 直接安裝(推薦)
原文外掛簡介
WooCommerce shows every shipping method and every gateway that fits the zone. Real shops often need less than that: no cash on delivery for guests, free pickup only for wholesale accounts, no courier for small orders, a separate set of gateways for customers abroad.
This plugin turns that into rules you can read: hide (or keep only) these shipping methods or these payment gateways when the cart in front of you looks like this.
Conditions
Customer role — including “guest” (anyone not logged in) and “any logged-in customer”.
Country — the shipping country, or the billing country in shops that do not ship.
Cart total — from / to, including or excluding tax, goods only or goods plus shipping (for payment rules).
Every filled-in condition has to hold. An empty condition is not a condition — it is simply not checked.
As many rules as you need
Rules run in priority order, lowest number first, and each one narrows what is left — a later rule cannot bring back a method an earlier one removed. Every rule can be switched off without deleting it.
Both checkouts, one decision
The classic checkout and the block checkout obey the same rules from the same PHP. Shipping rates are filtered where WooCommerce calculates them. For payment gateways the block checkout also asks on the client, and the answer it gets is the decision PHP already made and sent along with the cart, so a hidden gateway is refused by the Store API as well — it is not only hidden on screen.
The shipping-rate cache
WooCommerce caches the calculated rates in the session under a hash of the shipping package. The shopper’s role, the plugin settings and the rules themselves are not part of that package, so the plugin adds them as one extra key: the cache is refreshed exactly when the answer changes, and saving the rules refreshes it for every visitor.
Never a dead checkout
If the rules would remove every shipping method or every gateway, the full list is handed back instead and a line goes into the log. You can switch that guard off when “nothing available for this segment” is genuinely what you want.
Other details
Rules do not touch orders created by hand in wp-admin — they are about what a shopper may pick.
Optional log of every decision in WooCommerce → Status → Logs, source “ccsr”.
Compatible with High-Performance Order Storage (HPOS) and the Cart and Checkout blocks.
No external services, no tracking, nothing is sent anywhere.
