Cash on Delivery in WooCommerce is a one of its basic payment options. It works great with the flat rate, but if you are using table rate shipping plugins the flat rate might be simply not enough. In this article, I’ll show you how to use WooCommerce COD together with Flexible Shipping plugin.
Cash on Delivery (or simply COD) is a very useful payment method. It allows your clients to pay for a product when they receive it from the courier. The basic functionality of this feature is available in WooCommerce. You can get all the information about it in WooCommerce documentation. However, what if you want to offer COD payment for more advanced and non-WooCommerce-in-built shipping methods?
If you are using table rate shipping plugins, like Flexible Shipping, the basic COD might be not enough. You may encounter some difficulties or compatibility problems with the shipping methods coming from the 3rd party plugins, especially if they use the shipping cost calculation rules for specific shipping classes. But guess what – our Flexible Shipping plugin is fully compatible with the WooCommerce COD since it uses the same default WooCommerce shipping mechanisms. You will learn from this guide how to set everything up in two different ways – using Flexible Shipping PRO combined with WooCommerce COD and I will show you even more powerful combination with Active Payments payment management plugin.
As I mentioned before there are two different ways how it can be achieved, however, both of them involve using the Flexible Shipping PRO plugin.
In case you haven’t heard about it yet, Flexible Shipping is a very popular table rate shipping plugin with more than 100,000 shops using it on a daily basis. In the PRO version, it allows to set the shipping rules based on shipping class, which will be crucial in this case.
The best and most powerful Table Rate Shipping plugin for WooCommerce. Discover its endless possibilities and create the shipping cost calculation rules based on weight, price and more!
View Details or Add to cartSince both scenarios require using the Flexible Shipping plugin let’s begin and …
First, add a new shipping method, that will be enabled only for certain products or product categories. It’s all based on the shipping class. To do that, go to WooCommerce → Settings → Shipping and then to your Shipping Zone. There click on Add new shipping method button.
Next, choose Flexible Shipping as a shipping method and click Add shipping method.
As you can see it’s enabled by default just after it’s created. Click on the new Flexible Shipping method’s title:
to reach its configuration screen:
Enter its name by filling in the Method Title field. For the purposes of this guide I named it Fixed price for pizza. Next, scroll down in order to…
In the rules table at the bottom of the screen create a new rule using the Add rule button. Set:
Selecting the shipping class here is the most important action you need to take here since we want to target and display this shipping method only for products from the chosen shipping class.
In my example, it’s $10 for shipping products from the Pizza shipping class.
Once the Flexible Shipping method is configured and all the changes saved, we’ve reached the point where the road splits and we need to…
As I previously mentioned, Flexible Shipping is a table rate shipping plugin which methods use the same core mechanisms as WooCommerce defaults. In other words, they are fully compatible with WooCommerce COD, so you don’t need to be afraid they won’t be recognized or you’ll encounter any other issues. That’s why if you choose this scenario the only thing left now it to point the Flexible Shipping method you’ve created to be handled by WooCommerce COD payment method.
To do that go to WooCommerce → Settings → Payments. In the available payment methods table click on Cash on Delivery. On its configuration screen select the Flexible Shipping method you’ve created in the Enable for shipping methods field and save the changes:
If, in turn, you decided to use the second scenario i.e. …
which offers much more flexibility and gives you the possibility to include e.g. some additional fees, start with turning the Active Payments plugin on. Once it’s enabled go to WooCommerce → Active Payments. You should see all your configured shipping methods and active payment options there:
Using the checkboxes select which payment options should be available for each shipping method. In my case, it’s Cash on Delivery and PayPal for Fixed price for pizza shipping method dedicated for products with Pizza shipping class and PayPal for Standard shipping (other products).
Please note that you can also define the additional fees for each payment method in the Fees tab:
Having all set now, let’s see how it works live in my shop.
When the customer adds to the cart a product with Pizza shipping class he will see only the Fixed price for pizza Flexible Shipping method and both, the WooCommerce COD and PayPal payment methods will be available to choose:
However, if he puts a different product without Pizza shipping class into the cart the Standard shipping method appears and there is only PayPal payment gateway available to choose:
In this article, you learned a lot about conditional Cash on Delivery in WooCommerce. Also, I showed you how to set Cash on Delivery for specific products in WooCommerce. Now it’s all up to you. I hope it will be helpful. Good luck!
Thanks so much Bartosz for this helpful guide. In addition, how can I set a small shipping cost on the condition that a customer opts for COD? For example, I have a basic woocommerce site where am selling items. I want a situation where a customer can pay using VISA card or can decide to pay cash on delivery. However, if customer decides to pay cash on delivery, I want them to first instantly pay for a small shipping cost. How do I enable this, please? Thanks in advance.
Hi Jimmy, I believe in such case you will need to use some 3rd party plugin allowing to split the payment into two parts – the first one for the shipping and the second ‘COD part’. Unfortunately neither our Flexible Shipping nor Active Payments plugins have such feature in-built yet.
Hi great article. In the case that customer adds pizza (has cod option) and tshirt (no cod option) – both of them to the cart. How will it work? Will it still show cod option for both or not show for both? If i wish to split cod for pizza and other payment mode for tshirt on the same billing can that be achieved ? Please assist . TIA
Hi Janicd, the Active Payments plugin mentioned above allows to assign the payment option to the shipping methods, not directly to the specific products. It means that if you configure a shipping method which will be available to pick once the customers adds two different products with different shipping classes e.g. pizza and a t-shirt to the cart the same time, you’ll be also able to define which payment options he/she should be available to choose from. The same applies for the split-payment mode – if you grant your customers the possibility to split the shipping into separate packages and allow them to choose which shipping method each package should be delivered with, you’ll be also able to configure the payment option available for each of them.