How to create customer-specific conditional payments rule

Customer-specific rules tailor payment methods by login status, user, user role, or previous orders.

Create the rule at WooCommerce > Settings > Payments > Conditions. In the current admin, the Customer group starts with Logged in / out, User, User Role, and Previous Order. The dropdown continues after Previous Order.

Customer conditions

The visible Customer fields in the current admin are:

  • Logged in / out: match logged-in or guest customers.
  • User: a specific registered user.
  • User Role: a role such as Shop manager.
  • Previous Order: the customer’s previous-order history.
The Conditions dropdown open on the Customer group, with Logged in / out selected, and User and User Role listed; Phone and Previous Order appear above, and Shipping Address and First Name appear below
Figure - A Customer dropdown showing Logged in / out, User, and User Role

The screenshot above also shows a Shipping Address group below User Role. That group is not visible in the current admin dropdown screenshot. Additional Customer fields may appear below Previous Order in the current dropdown; those labels are not confirmed in the settings-map screenshot.

How to create the rule

  1. Go to WooCommerce > Settings > Payments, then open Conditions and click Add New. Turn on Status and enter a Rule Name.
  2. In Conditions, choose a Customer field, an operator such as Equal to ( = ), and a value. The example uses Logged in / out Equal to ( = ) Logged Out.
  3. In Actions, choose Enable Payments Methods or Disable Payments Method. Click Save Changes, then test checkout as a guest and as a logged-in customer.
A Logged in / out condition set to Equal to Logged Out, with a Disable Payments Method action for Cash on delivery
Figure - A rule that disables Cash on Delivery for logged-out customers
Checkout showing Direct bank transfer and Check payments, with an annotation that COD is disabled for guest or logged out users
Figure - A checkout page with Cash on Delivery hidden for a logged-out customer

Pro Tips

  • Use the exact label Logged in / out (with spaces). The value in the example is Logged Out; the dropdown also shows Logged In.
  • The current field name is Previous Order, not “Previous Orders.”
  • You can combine User Role and Previous Order in the same rule if you need a narrower match.

Common Use Cases

1. Offer a method to a VIP role

Use User Role Equal to ( = ) your VIP role and Enable Payments Methods for a method such as Direct bank transfer.

2. Restrict methods for new customers

Use Previous Order to match customers with no previous orders, or fewer than a set number, then Disable Payments Method for the methods you want to hold back.

3. Hide Cash on Delivery for guests

Use Logged in / out Equal to ( = ) Logged Out and Disable Payments Method for Cash on delivery, as in the example above.

FAQs

1. Which customer conditions are confirmed in the current admin?

Logged in / out, User, User Role, and Previous Order. The list continues after Previous Order, but those extra labels are not visible in the settings-map screenshot.

2. What values does Logged in / out use?

The documentation screenshots show Logged In and Logged Out.

3. Can I target one customer?

Yes. Use the User condition and select the registered user.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.