Blog

How to set up cash on delivery in WooCommerce

Ink sketch of a parcel on a doorstep beside a closed front door.

Cash on delivery is built into WooCommerce, so you do not need a plugin. Go to WooCommerce, Settings, Payments, open the offline payment methods, enable Cash on delivery and click Manage. There you set the title and text customers see, choose which shipping methods offer it, and decide whether to accept it on orders with no physical products. It is off on a new store. When it is missing at checkout, one of those settings is almost always the reason.

This guide explains each setting, the exact rules WooCommerce uses to show or hide cash on delivery, how to offer it only in some areas, the options for charging extra, and how to test it before you go live.

How do you turn on cash on delivery in WooCommerce?

WooCommerce’s cash on delivery documentation gives these steps:

  1. Go to WooCommerce, Settings, Payments, then Take offline payments.
  2. Click the Enable button for Cash on Delivery.
  3. Click Manage to open its settings.
  4. Fill in the settings described below.
  5. Save changes.

In the WooCommerce source code, the “Enable cash on delivery” switch defaults to off. A fresh store does not offer cash on delivery until you turn it on, even though the method is listed.

What does each cash on delivery setting do?

We read the cash on delivery gateway in the WooCommerce source, version 11.3.0, to see what each setting does beyond its label.

  • Title. The name of the payment method at checkout. The default is “Cash on delivery”. Something like “Cash on delivery (pay the courier)” tells customers exactly what to expect.
  • Description. The short text shown under the title when a customer picks it at checkout.
  • Instructions. Text added to the order received page and to the customer’s order emails. The source adds it only to customer emails, not to the email you get as the store owner. Use it for things like “Please keep the exact amount ready” or “Our courier will call before delivery”.
  • Enable for shipping methods. A list of shipping methods that offer cash on delivery. If you leave it empty, cash on delivery is offered with every shipping method.
  • Accept for virtual orders. Whether cash on delivery is offered when nothing in the cart needs shipping. In the source this box is ticked by default.

There is no setting for an extra fee, a minimum order amount or specific products. Those need the workarounds further down.

Why is cash on delivery not showing at checkout?

WooCommerce decides whether to show cash on delivery each time the checkout loads. We read that check in the source, in the file that handles shipping method restrictions. It runs in this order:

  1. Is it enabled? If the main switch is off, it is hidden.
  2. Does the order need shipping? WooCommerce looks at the cart, or at the order if the customer is paying for an existing order. If nothing needs shipping and “Accept for virtual orders” is unticked, it is hidden.
  3. Is there a shipping method list? If “Enable for shipping methods” is empty, it is shown.
  4. Has the customer chosen a shipping method yet? If no shipping method is chosen yet, it is shown.
  5. Does the chosen method match the list? If the customer’s shipping method is not on the list, it is hidden.

Step 4 explains a common complaint. A customer sees cash on delivery, enters their address, gets a shipping method that is not on your list, and the option disappears. Nothing is broken. The setting is doing what it says.

The newer block checkout uses the same two settings. In the source, WooCommerce passes the shipping method list and the virtual order setting to the block checkout’s cash on delivery code.

If none of those settings explains it, check these:

  • The cart total is zero. WooCommerce’s cart only asks for payment when the total is above zero. A fully discounted order shows no payment methods at all.
  • Another plugin hides it. WooCommerce passes the list of available payment methods through a filter, woocommerce_available_payment_gateways, before it shows them. A plugin for payment rules, a multi-vendor plugin or a custom code snippet can remove cash on delivery there. Turn plugins off one at a time on a staging copy to find it.
  • The customer’s address is outside your shipping zones. Check that every area you deliver to falls in a zone with at least one shipping method, and that the method is on your cash on delivery list.
  • A cached checkout page. If your cache serves an old copy of the checkout, settings changes do not show. Exclude the cart and checkout pages from page caching.

How do you offer cash on delivery only in some areas?

Use shipping zones, then point the cash on delivery setting at the methods in the zones you want. WooCommerce’s guide to setting up shipping zones explains how to make a zone for a group of regions or postcodes and add shipping methods to it.

The “Enable for shipping methods” list then gives you two kinds of choice. You can pick a whole method type, such as any Flat rate method in any zone. Or you can pick one method in one zone, which the list shows with the zone name, the method title and its ID number. That second kind is how you limit cash on delivery to one area.

For example, a store could set up two zones, one for the city where its own rider delivers and one for the rest of Pakistan. It would then tick only the first zone’s flat rate in the cash on delivery list. Customers in that city see cash on delivery, and everyone else sees only the other payment methods.

How do you charge an extra fee for cash on delivery?

WooCommerce has no setting for it. There are three ways to add one.

Can you do it with shipping methods alone?

Yes, with built-in settings only. In each zone, add a second flat rate method with a higher cost and a clear name, for example “Delivery with cash on delivery”. Then tick only that method in the cash on delivery “Enable for shipping methods” list. Cash on delivery now appears only when the customer picks the more expensive delivery, and the difference is your fee.

The catch is that the fee is tied to the shipping method, not the payment method. A customer can still pick the cash on delivery shipping method and then pay by card, so word the method’s name so nobody picks it by mistake.

What about an extension or custom code?

WooCommerce’s cash on delivery page points to a paid extension that adds a fee and more rules. A developer can also add a fee with WooCommerce’s fees API, which WooCommerce documents in its guide to adding a surcharge to the cart and checkout. The examples there add fees by percentage or by country. A fee that depends on the payment method also has to refresh when the customer switches methods, so test it on the checkout your store uses.

Whichever way you choose, show the fee clearly before the customer places the order, in the method’s name or description.

How do you turn off cash on delivery for some orders?

The built-in settings cover two cases:

  • Digital products, services and courses. Untick “Accept for virtual orders”. Cash on delivery then disappears whenever nothing in the cart needs shipping.
  • Some areas or delivery types. Leave those shipping methods off the “Enable for shipping methods” list.

WooCommerce has no switch to block cash on delivery for a single product, or above a certain order value. Both need an extension or custom code that filters the available payment methods. If you only want to switch it off completely, untick “Enable cash on delivery” and save.

What happens to a cash on delivery order after checkout?

From the source, a cash on delivery order with a total above zero goes to “Processing”. If the order contains a downloadable product, it goes to “On hold” instead.

WooCommerce’s documentation says the order stays on “Processing” until you collect the money, and that you should confirm the payment before you mark it “Completed”. A simple routine works:

  1. Pack and ship orders on “Processing”.
  2. Match each courier payment to its order numbers when it reaches your account.
  3. Mark those orders “Completed”.
  4. Mark returned parcels “Cancelled” so your order list matches what was actually paid.

The status change to “Processing” also sends the new order email to you and the order confirmation to the customer. If those emails do not arrive, see our guide on why WooCommerce order emails don’t arrive.

How do you test cash on delivery before going live?

Test on a staging copy if your hosting has one, or while the store is not yet taking orders:

  1. Make a test zone with two shipping methods, and put only one of them in the cash on delivery list.
  2. Add a physical product to the cart in a private browser window and go to checkout.
  3. Switch between the two shipping methods. Cash on delivery should show for one and disappear for the other.
  4. Untick “Accept for virtual orders”, add only a virtual product to the cart, and check that cash on delivery is gone.
  5. Place one cash on delivery order and check that it lands on “Processing” and both emails arrive.

Should cash on delivery be your only payment method?

It is the easiest method to start with, because it needs no gateway, no NTN and no plugin. The cost comes later, in parcels that come back and courier payments you match by hand. You can add card and wallet payments next to it once you have a gateway account. Our guide on accepting online payments on WooCommerce in Pakistan compares the options, and the guide on starting a WooCommerce store in Pakistan covers the rest of the setup.

Cash on delivery runs entirely inside WooCommerce, so it works on any hosting that runs WooCommerce. If you are choosing a host for a new store, our WooCommerce hosting page explains what our plans include.

Frequently asked questions

Do I need a plugin for cash on delivery in WooCommerce?

No. It is built into WooCommerce. Turn it on under WooCommerce, Settings, Payments, in the offline payment methods.

Why does cash on delivery disappear after the customer enters their address?

Your “Enable for shipping methods” list does not include the shipping method that address gets. WooCommerce shows cash on delivery until a shipping method is chosen, then hides it if the method is not on the list.

Can I charge extra for cash on delivery?

Not with a built-in setting. You can add a more expensive shipping method and allow cash on delivery only with it, use an extension, or have a developer add a fee with WooCommerce’s fees API.

How do I disable cash on delivery for digital products?

Untick “Accept for virtual orders” in the cash on delivery settings. It then disappears whenever nothing in the cart needs shipping.

What order status does a cash on delivery order get?

Processing, or On hold if the order contains a downloadable product. Mark it Completed yourself once the courier has paid you.

Category:

Written by

Muhammad Dilawar

Muhammad Dilawar

Muhammad Dilawar is a WordPress developer and technical SEO specialist with over 12 years of experience building, optimizing and maintaining websites. He works with WordPress, WooCommerce, server optimization, DNS, SSL, Cloudflare, website security and performance, and is a Top Rated freelancer on Upwork.

Hosting for your WordPress site

Yearly plans in rupees, with the same price at renewal. Free SSL and daily backups on every plan.