Simple Conditional Shipping and Payments
Restrict or allow payment and shipping methods based on specific parameters, such as cart total and weight, a specific product or product category in the cart, the customer’s country, postcode, etc.
How to Configure Payment Gateways by User Roles
In this tutorial, I will show you how you can configure WooCommerce role-based payment methods. In other words, how you can enable or disable specific payment methods in your store depending on a user role, for example, to restrict the use of “Cash on delivery” for the “Subscriber” role or allow using some payment methods with a discounted price for “Premium customers”.
As usual, I will show you both plugin and programmatic approaches.
Disable Payment Method for a Specific Product
In this tutorial, I will show you two things: how to disable a payment method on your WooCommerce store for a specific product, and then we will do it for a product category (or a product tag, or a product brand – the whole idea is the same).
We will do it using two approaches:
- at the beginning, I will show you how to do it with the plugin,
- and after that we will dive into the programmatic approach.
Let’s jump into it.
Enable or Disable Payment Methods for Shipping Methods
Sometimes, in your WooCommerce store, you may need to allow specific payment methods depending on the selected shipping method by a customer.
The simplest example is when you want to allow the “Cash on delivery” payment method when “Local pickup” is selected as the shipping method. Or maybe vice versa – when your pickup points don’t accept cash, and you need “Cash on delivery” enabled only for shipping products with a carrier.

Conditional Payment Methods by Product & Country
This time, I will show you two ways of how to set up (enable or disable) payment methods in your WooCommerce store based on two conditions:
- Condition 1: A specific product in the cart (there is a separate tutorial about this condition),
- Condition 2: A customer’s billing (or shipping) country (here is a separate tutorial as well).
My goal is to show you how to combine both these conditions. For example, what if you want to only allow “Payment gateway A” when selling “Product B” to “Country C”?
Disable Payment Methods for Specific Countries
In this tutorial, we will discuss country-based payments in WooCommerce.
It is a common case that some payment processors work only for customers from specific countries. For example, if you accept payments from customers from Sweden, you’d like to include Klarna payments for them; however, if you also have customers from all over the world, maybe it would be a great idea to hide the Klarna payment method from your WooCommerce store’s checkout page for some countries, right?
Below, I’m going to show you two simple ways of achieving that: at first, we will do it using my Simple Conditional Shipping and Payments plugin, and after that, I will also uncover a programmatic approach, using the woocommerce_available_payment_gateways filter hook.
Sounds good? Let’s dive into it now.
Stripe Subscriptions Integration with Payment Intents API
For the last couple years we with the team have built tons of different payment integrations for our clients. In this tutorial I would like to share with you my experience of developing Stripe subscriptions integration for WordPress (or pretty much any PHP website).
I am also going to use modern Stripe Payment Intents API in this guide. If you want to learn a little bit more about payment intents and why it is so cool to use them, I recommend to take a look at my another tutorial.
In order to make this tutorial simple I included only the very basics which are necessary to make the subscriptions work. Please don’t forget about validations, processing errors and protection against card testing attacks for example. If you need some help with it, you can always contact us and we will develop everything for you the best possible way.
And now let’s dive into the tutorial!