跳到内容

Hide Payment & Shipping Methods by User Role for WooCommerce by B2BM

v1.0.2

B2B Managers · 2026年10月24日 上架

Hide payment methods and hide shipping methods by user role or for guests in WooCommerce, on both the classic checkout and the block checkout.

正在使用
10 以下
评分
暂无
累计下载
275
最近更新
2026年11月24日
需要 WordPress 5.6+已测试到 7.1.5PHP 7.4+

贡献者

截图

Settings screen — every enabled payment method and every shipping method by zone, each with the user roles it is hidden from.
Settings screen — every enabled payment method and every shipping method by zone, each with the user roles it is hidden from.
Block checkout for a wholesale customer — bank transfer and freight are offered, cash on delivery is hidden.
Block checkout for a wholesale customer — bank transfer and freight are offered, cash on delivery is hidden.
Block checkout for a guest — only Standard shipping and Cash on delivery are offered.
Block checkout for a guest — only Standard shipping and Cash on delivery are offered.

Hide payment methods and hide shipping methods by user role in WooCommerce. Hide Payment & Shipping Methods by User Role for WooCommerce, by B2B Managers, lets you choose which payment methods and which shipping methods each customer group is offered at checkout. Hide a payment gateway or a shipping method from any user role, or from guests who are not logged in, and WooCommerce simply stops offering it to them.

Different customers need a different checkout. Wholesale accounts on agreed terms should be able to pay by bank transfer or cheque, while retail customers pay by card. Cash on delivery is fine for repeat customers but risky for anonymous guests. Pallet freight is for trade buyers, not for someone ordering a single item. WooCommerce has no setting for payment methods by user role or shipping methods by user role, so every enabled method is shown to everyone. This plugin adds those conditional payment methods and conditional shipping methods from one settings screen, with no code and no rule builder to learn.

How to hide payment methods and shipping methods

Go to WooCommerce Payment & Shipping by Role. The screen lists:

  • Every payment method that is enabled in WooCommerce, with its gateway ID
  • Every shipping method in every shipping zone, including the “Locations not covered by your other zones” zone

Next to each method, select the user roles it should be hidden from. Leave the list empty and the method stays visible to everyone. Save, and the rules apply to the cart and checkout straight away, including for customers who already have items in their cart.

That is the whole configuration: one matrix of payment methods, shipping methods and user roles.

Features

Hide payment methods by user role

  • Hide or disable any enabled payment gateway for one or more user roles
  • Restrict payment methods with any gateway plugin: direct bank transfer, cheque, cash on delivery, Stripe, PayPal, purchase order and any other payment gateway listed under WooCommerce Settings Payments
  • Hide payment methods from guests (customers who are not logged in)

Hide shipping methods by user role

  • Hide any shipping method (flat rate, free shipping, local pickup or a method added by another plugin) for selected user roles or for guests
  • Rules are set per shipping zone, so the same “Flat rate” can stay visible in one zone and be hidden in another
  • Applies wherever WooCommerce calculates shipping rates, including the cart and the checkout

Any user role, including custom ones

  • Lists every role on your site: Customer, Subscriber, Shop manager and any custom role such as Wholesale Customer, Trade or Distributor created by a wholesale or membership plugin
  • Guests are available as their own option, “Guest (not logged in)”

Classic checkout and block checkout

  • Uses WooCommerce’s own payment gateway and shipping rate filters, which the classic checkout and the block-based Cart & Checkout (Store API) both respect
  • Declares compatibility with block-based Cart & Checkout and with High-Performance Order Storage (HPOS)

Lightweight and safe

  • Two WooCommerce filters and one database option. No custom tables, no scripts on the storefront, no external requests and no tracking
  • The admin area is left alone, so you can still pick any payment method when creating an order manually
  • Settings are saved with a nonce check and a capability check (manage_woocommerce), and every value is validated against the real list of roles
  • Deleting the plugin removes its option from the database, unless Payment & Shipping by Role Pro or the B2B Managers Suite still uses it

Conditional payment methods: common use cases

  • Bank transfer or cheque for wholesale only. Offer Direct bank transfer and Check payments to your Wholesale Customer role and hide these payment methods from retail customers and guests.
  • Disable cash on delivery for guests. Hide Cash on delivery from guests so only registered, known customers can use it.
  • Card payments for retail, invoice terms for trade. Hide your card payment gateway from trade accounts that pay on terms, and hide the invoice or purchase order gateway from everyone else.

Conditional shipping methods: common use cases

  • Freight for trade accounts. Show a pallet or freight shipping method only to B2B roles, and hide the shipping method from retail customers.
  • Local pickup for selected customers. Keep local pickup for staff, wholesale or trade roles and hide it from the public.
  • Free shipping for members. Show a free shipping method only to a members role and hide free shipping from everyone else.

Who is it for?

  • Wholesale and B2B WooCommerce stores that sell to trade and retail customers from the same shop
  • Hybrid B2B + B2C stores that need a different checkout for each customer group
  • Distributors and manufacturers that offer freight or pallet delivery to trade accounts only
  • Membership and members-only stores
  • Any store that wants to restrict risky payment methods, such as cash on delivery, to known customers

Free and Pro

Everything described on this page is included in this free plugin, with no limits on roles, payment methods or shipping methods.

For stores that need more than role-based rules, Payment & Shipping by Role Pro for WooCommerce is available from B2B Managers. It adds:

  • Conditional payments based on cart value, country and basket contents, for example card payments only above a set order value or no cash on delivery outside your country
  • Rules for named customer accounts
  • “Show only where the conditions hold” rules, so a method appears only where you allow it
  • A surcharge or a discount on a payment method, such as a card fee or a bank transfer discount, optionally limited to particular roles
  • The same conditions for shipping methods
  • Scheduled start and end dates

Pro reads the same settings, so your existing role rules carry over when you upgrade. The free plugin works on its own and does not require Pro.

Part of the B2B Managers range

This plugin is part of a free range of B2B and wholesale tools for WooCommerce by B2B Managers. Each plugin works on its own and they work well together:

Documentation and support

Documentation, setup guides and the full B2B Managers extension catalog are on b2bmanagers.com. For questions about this plugin, visit the plugin page or use the wordpress.org support forum.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums