Linux 软件免费装
Banner图

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

开发者 woomanagers
更新时间 2026年11月24日 16:32
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

b2b conditional payments hide shipping methods hide payment methods payment methods by user role

下载

1.0.1 1.0.0

详情介绍:

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: 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 shipping methods by user role Any user role, including custom ones Classic checkout and block checkout Lightweight and safe Conditional payment methods: common use cases Conditional shipping methods: common use cases Who is it for? 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: 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.

安装:

  1. In your WordPress admin, go to Plugins → Add New, search for "Hide Payment & Shipping Methods by User Role" and click Install Now. You can also upload the plugin folder to /wp-content/plugins/.
  2. Activate the plugin through the Plugins screen. WooCommerce must be installed and active.
  3. Make sure the payment methods you want to control are enabled under WooCommerce → Settings → Payments, and that your shipping zones and methods are set up under WooCommerce → Settings → Shipping.
  4. Go to WooCommerce → Payment & Shipping by Role.
  5. For each payment method and shipping method, select the roles it should be hidden from. Hold Ctrl (Windows) or Cmd (Mac) to select more than one role. Choose "Guest (not logged in)" to hide a method from visitors who are not logged in.
  6. Click Save Settings. The rules apply to the cart and checkout immediately.

屏幕截图:

  • 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.

升级注意事项:

1.0.2 Renames the plugin to "Hide Payment & Shipping Methods by User Role for WooCommerce by B2BM". No functional changes. 1.0.1 Shipping rules now apply immediately to open carts and after a customer's role changes. Also rebrands to B2B Managers. 1.0.0 Initial release.

常见问题:

How do I hide a payment method for a specific user role in WooCommerce?

Go to WooCommerce → Payment & Shipping by Role, find the payment method in the Payment methods table, select the role (or roles) it should be hidden from and click Save Settings. Customers with that role will no longer see the payment method at checkout.

How do I hide a shipping method by user role?

Use the Shipping methods table on the same screen. Each shipping method is listed with its zone, for example "United States — Flat rate". Select the user roles it should be hidden from and save.

Can I hide payment methods or shipping methods from guests only?

Yes. Every list includes "Guest (not logged in)". Select it to hide a method from visitors who are not logged in, while logged-in customers still see it.

How do I disable cash on delivery for guests or for one user role?

Find Cash on delivery in the Payment methods table and select "Guest (not logged in)", or the user role, in its hidden list. Cash on delivery is then no longer offered to them at checkout, and everyone else still sees it.

How do I offer bank transfer or invoice payment to wholesale customers only?

Find the payment method, for example Direct bank transfer, and select every role except your wholesale role, plus "Guest (not logged in)". Only wholesale customers are then offered that payment method.

Does it work with the WooCommerce block checkout?

Yes. The plugin uses WooCommerce's standard payment gateway and shipping rate filters, which the block-based Cart & Checkout respects through the Store API. The classic checkout and the block checkout behave the same way, and the plugin declares compatibility with block-based Cart & Checkout.

Does it work with my payment gateway plugin?

It works with any payment gateway that is enabled in WooCommerce, including Stripe, PayPal, Square, bank transfer, cheque, cash on delivery and purchase order gateways. Only enabled gateways are listed. If a payment gateway is missing, enable it under WooCommerce → Settings → Payments first.

Can I hide a shipping method in one shipping zone but not in another?

Yes. Rules are stored per shipping method instance, so each method in each zone has its own setting. The same "Flat rate" can be visible in one zone and hidden in another.

Can I hide free shipping or local pickup by user role?

Yes. Free shipping, local pickup and flat rate are listed like any other shipping method, once for each zone they are in. Select the roles each one should be hidden from.

Are these conditional payment methods? Can I set conditions other than user role?

The free plugin has one condition: the customer's user role, with guests as their own option. Conditional payments and conditional shipping based on cart value, country or basket contents are part of Payment & Shipping by Role Pro.

Does it work with custom user roles such as Wholesale Customer?

Yes. The settings screen lists every role registered on your site, including roles added by wholesale, membership or B2B plugins.

What happens if a customer has more than one role?

If any of the customer's roles is in a method's hidden list, the method is hidden for that customer.

What happens if I hide every payment method from a role?

Customers with that role will not be able to place an order, because WooCommerce has no payment method to offer them. Make sure each role and guests always keep at least one payment method and, for orders that need shipping, at least one shipping method.

Can I still use a hidden payment method when I create an order in the admin?

Yes. The rules only apply on the storefront. In the WordPress admin every enabled payment method stays available, so you can still create manual orders with any method.

How can I test what a customer with a certain role sees?

Log in with a test account that has that role, or open your store in a private browser window to see what guests see. As an administrator you see the checkout for the Administrator role.

Do new rules apply to customers who already have a cart?

Yes. Payment methods are checked every time the checkout loads, and saving the settings tells WooCommerce to work out shipping rates again, so customers see the new rules on their next page load. Shipping rates are also worked out again when a customer's role changes, for example when you approve them as a wholesale customer.

Will new payment or shipping methods be hidden automatically?

No. A newly added method is visible to everyone until you select roles for it on the settings screen.

Does the plugin change prices or add fees?

No. It only shows or hides payment and shipping methods. Payment method surcharges and discounts are available in Payment & Shipping by Role Pro.

Is there a Pro version?

Yes. Payment & Shipping by Role Pro for WooCommerce adds conditions on cart value, country and basket contents, rules for named customers, "show only here" rules, payment surcharges and discounts, and scheduled rules. Everything described on this page is included in the free plugin.

Is it compatible with HPOS?

Yes. The plugin does not read or write order data and declares compatibility with WooCommerce High-Performance Order Storage.

What happens to my settings if I delete the plugin?

Deleting the plugin from the Plugins screen removes its single option (wmpsr_settings) from the database. If Payment & Shipping by Role Pro or the B2B Managers Suite is installed, the option is kept because they use it. Deactivating the plugin keeps your settings.

更新日志:

1.0.2 1.0.1 1.0.0