1. Home
  2. Docs
  3. WooCommerce Product Restrictons
  4. FAQ’s
  5. Restrict Payment Gateways

Restrict Payment Gateways

Question:-
I am trying to restrict Payment Gateways based on whether a user is purchasing a subscription service or not.

For Example:
For a subscription, I want them to use Gateway A
For a regular Product, I want them to use Gateway B.

I currently have it set up so that I can successfully restrict the gateway if the user is purchasing a Subscription OR a Regular Product.

The issue I am coming up against is that when someone tries to purchase a Subscription AND a Regular Product, then no gateway is available.

What I am trying to get is that if they have a Subscription product (either as a solo purchase or with other products) in their checkout, Use Gateway A – else use Gateway B (if no subscription is in checkout).

Is there ability to do If/than or else rules. Or a way to configure it so that if a Subscription is in the checkout use Gateway A – else use Gateway B?

Answer:-

Was this article helpful to you? Yes No

How can we help?