WooCommerce is the free plugin that turns a WordPress site into a store, and it ships with a cash on delivery payment method already built in. That makes it a natural choice for a Moroccan seller who wants full control over the site, the domain and the data. It also leaves you responsible for what a hosted platform would do for you: the server, the updates, the plugins and the path an order takes from "new" to "cash in hand". This guide walks through the settings that matter for a COD store in Morocco, in the order you meet them, and relies on WooCommerce's own documentation for every screen. If you are still choosing your tools, our comparison page shows where an order management tool fits next to WooCommerce.
Hosting: what the server has to support
WooCommerce runs on your own hosting, so the first decision is a technical one. WooCommerce's server recommendations, written for WooCommerce 10.8 and later, ask for WordPress 6.9 or greater, PHP 8.3 or greater (tested up to PHP 8.4), MySQL 8.0 or greater or MariaDB 10.6 or greater, HTTPS support and a WordPress memory limit of 256 MB or greater. Apache or Nginx is recommended, but any server that supports PHP and MySQL works.
Two lines on that page matter more in Morocco than elsewhere. The first is Multibyte String support, listed as optional but required if you run a non-English store: a shop in French or Arabic is exactly that case. The second is the legacy note. WooCommerce still works with PHP 7.4, but that version has reached its official end of life and may expose the site to security vulnerabilities. The cheapest shared plans sometimes stay on old PHP versions, so ask before you pay.
Once WooCommerce is installed, the System Status page shows whether the server has these items. WordPress.org adds a security recommendation worth putting to any host: hosting is more secure when PHP applications such as WordPress run under your account's username instead of a shared default one. Finally, new installations have stored orders in High-Performance Order Storage by default since WooCommerce 8.2, and the HPOS documentation says these dedicated tables make targeted backup and restore simpler. In a COD store the order table is the business, so pick a host that backs up every day and lets you restore without opening a ticket.
Store settings: Morocco, dirhams and addresses
Under WooCommerce > Settings > General you set the store address, where you sell and ship, and the currency. The general settings guide describes the options: you can sell to all countries, all countries except some, or specific countries, and you can ship only to the countries you sell to or a subset of them. A store that only delivers in Morocco should pick Morocco as its single selling country. Buyers elsewhere then cannot place orders you could never deliver.
The default customer location decides when delivery is calculated. With "No location by default", taxes and shipping are not calculated until the customer enters an address, which avoids showing the fee for the wrong city on a product page.
For currency, choose the Moroccan dirham. Only one currency may be selected, and the shop currency guide warns that changing it later does not convert any amounts: prices keep the same numbers, and past orders keep their currency and totals. Set the currency before you import products, not after. Many Moroccan stores show round prices in dirhams, so you can set the number of decimals to zero and choose the thousand separator your buyers read naturally.
Turning on cash on delivery
Cash on delivery is part of core WooCommerce, so no extension is needed. According to the Cash on Delivery documentation, you go to WooCommerce > Settings > Payments > Take offline payments, click Enable for Cash on Delivery, then Manage to open its settings. Several fields deserve more than a quick click:
- Title: the label shown at checkout. "Pay in cash on delivery", in the language of the store, is clearer than the default.
- Description: shown when the buyer selects the method. Say that someone from your team will call to confirm before the parcel leaves.
- Instructions: they explain how to pay. State that the courier collects the exact amount in cash, and say what your policy allows about opening the parcel.
- Enable for shipping methods: you choose which shipping methods and rates offer COD. Use it to offer COD only where your carrier collects cash.
- Accept for virtual orders: leave it unticked in a store of physical products; there is nothing for a courier to hand over.
The core gateway has no setting for a COD fee; WooCommerce points to the paid Advanced Cash on Delivery with Fee extension for that. Folding the cost into the product price or the delivery fee is usually simpler, because one more line at checkout is one more reason to abandon.
Shipping zones and delivery fees
WooCommerce prices delivery through shipping zones. The shipping zones guide sets out the rules: each customer matches only one zone, the first one from the top of the list, so zones must be ordered from the smallest area to the largest. A zone can group countries, states or provinces, or postcodes. The default "Rest of the world" zone catches everyone else, and a customer whose address falls in a zone without shipping methods is told that no shipping is available.
For a store that only delivers in Morocco, a simple structure is enough:
- a zone for your own city, limited by postcode, if you deliver there yourself or your carrier charges less there;
- a "Morocco" zone for the rest of the country with one flat rate;
- no methods in "Rest of the world", so foreign addresses cannot check out.
Each zone can offer flat rate, free shipping and local pickup. A flat rate can be a fixed cost or a formula based on the number of items or a percentage of the order, with minimum and maximum fees. The default method is the first enabled one in the zone, so put the one you want buyers to pick at the top. A postcode zone depends on the buyer typing a correct postcode; if that field is optional in your form, keep a national rate as the safety net. Then go back to the COD settings and tick only the methods your carrier covers.
A checkout built for the confirmation call
A COD order is only as good as the phone number on it. Stores started after WooCommerce 8.3, released in November 2023, use the Cart and Checkout blocks by default, as the cart and checkout guide notes. In the Checkout block, the Address Fields setting shows or hides the Company, Address Line 2 and Phone fields, and decides whether the address and phone are required. For a Moroccan COD store, make the phone required and hide the company field: every field you remove is one less reason to give up.
The Terms and Conditions block has a Require Checkbox setting that makes customers confirm they accept your terms before they can place the order. Turn it on; Moroccan law, covered below, asks for exactly that.
Check the payment step after every new plugin. The payment methods shown at checkout depend on which gateways are active and whether they support the Checkout block, and WooCommerce warns that a gateway that is not compatible with the block checkout may simply not appear. Place a test order from a phone after each change.
Prank and impulse orders come with COD. A required phone field does not stop them, but it makes the confirmation call possible; our guide to COD order confirmation in Morocco explains how to run those calls.
Order statuses: what they mean for a COD order
WooCommerce's statuses were designed around online payment, so a COD seller has to read them carefully. The order statuses page lists Draft, Pending payment, Processing, Completed, On hold, Failed, Cancelled and Refunded. The COD gateway sets new orders to Processing until payment is collected, and WooCommerce asks the store owner to confirm that the cash has been collected before setting the order to Completed.
| WooCommerce status | What it means in a COD store |
|---|---|
| Processing | A new order, not yet confirmed by phone. Stock has already been reduced. |
| Cancelled | Refused at confirmation, never reached, or returned by the carrier. Stock comes back if stock management is on. |
| Completed | Delivered and paid. Use it when the cash is confirmed, not when the parcel leaves. |
| Pending payment, On hold, Failed, Refunded | Built for online payment; a store that only sells COD rarely uses them. |
Three consequences follow. First, Processing hides the real stages of a COD order: confirmed, shipped, delivered, returned. The core list has no status for them, so you either add custom statuses with a plugin or track those stages somewhere else. Second, the order editing guide states that orders in Processing or any later status are no longer editable. When a buyer asks on the confirmation call for a second unit or another size, you cannot simply change the order; you create a new one from the admin, which WooCommerce supports for phone orders, and cancel the first. Third, notes: a private note stays internal, while a note to the customer is emailed to them immediately. Log call attempts as private notes.
Turn on stock management under WooCommerce > Settings > Products > Inventory, as the products settings guide describes, and set a low stock threshold. Because Processing already reduces stock, a burst of unconfirmed orders can show a product as sold out before a single parcel leaves; cancelling refused orders quickly is what keeps the count honest.
Plugins, webhooks and the REST API
WordPress makes it easy to install a plugin for every gap, and each one adds code that has to stay compatible with the checkout, the theme and WooCommerce updates. For a COD store the useful list is short: a custom order status plugin if you want to manage the stages inside WordPress, a checkout field editor only if the block settings are not enough, and an order form on the product page if your ads send traffic straight to a product. Before installing anything, check that the plugin declares compatibility with the Cart and Checkout blocks.
To send orders to another system, WooCommerce has two built-in tools. Webhooks send a notification to a URL whenever an order, product, coupon or customer is added, edited or deleted. WooCommerce disables a webhook automatically after more than five consecutive delivery failures, and the delivery logs live in WooCommerce > Status > Logs, so check them as soon as orders stop arriving on the other side. The REST API uses keys created under WooCommerce > Settings > Advanced > REST API with Read, Write or Read/Write access; permalinks must be set to any option other than Plain, and the Consumer Secret is shown only once.
COD also has a security advantage. WooCommerce's security FAQ notes that offline gateways such as cash on delivery have far fewer security concerns than automated, instantaneous payment methods: no card data passes through your site.
Terms of sale, withdrawal and customer data
Morocco's consumer protection law applies to a WooCommerce store as to any other. As Captain Legal summarises it, article 30 of law 31-08 requires the contract terms to be accessible from the home page and expressly accepted before the order is confirmed: link your terms in the footer and make the checkbox required. Articles 25 to 44 govern distance selling, including the seller's liability for the providers it uses, carriers included (article 26). The buyer has seven days to withdraw without reason or penalty, and only the return costs may be left to them; without a written confirmation of the order, that period goes from seven to thirty days (article 36). WooCommerce sends an email when an order's status changes, which helps when the buyer gives an email address; for buyers who do not, keep a written confirmation through another channel.
Customer data falls under law 09-08, supervised by the CNDP. By default WooCommerce keeps the products ordered, the buyer's name, email address, phone number and billing address, and a note of the payment method, all stored in your host's database. Choose a host you trust with that database, keep admin accounts to a minimum and publish a privacy policy.
When orders outgrow the dashboard: WooCommerce with Cashod
WooCommerce is one of the stores Cashod connects; the WooCommerce integration page explains how orders come in. That covers the gaps above without stacking plugins. Cashod includes a call center where agents confirm COD orders by phone, and it can confirm orders over WhatsApp, including with an AI agent. Cashod tracks returned parcels, and each carrier's delivery and return fees are set per city, which a single WooCommerce flat rate cannot show you. One Cashod account can manage several stores, so a seller with a WooCommerce site and a Shopify or YouCan store keeps one order queue.
For delivery, Cashod works with Moroccan carriers such as Sendit, Ozon Express, Ameex, Cathedis, Forcelog, Onesta, Kargo Express, Speedaf, Gold Colis, Express Relais, HL Express, Livo, Olivraison and Digylog, and with Navex in Tunisia.
Any other carrier can be added manually, without automatic shipment creation or tracking.
Plans and prices are on the pricing page. Cashod support answers by email, chat and phone, Monday to Friday, 9 AM to 6 PM GMT (Morocco time).
Checklist before the first order
- Hosting on PHP 8.3 or greater with HTTPS, checked on the System Status page.
- Selling and shipping limited to Morocco; currency set to the dirham before products are imported.
- Cash on delivery enabled with a clear title, description and instructions in the store's language.
- Shipping zones ordered from smallest to largest, with no methods in "Rest of the world".
- Phone required at checkout, company field hidden, terms checkbox required.
- Stock management on, and a clear rule for who moves orders from Processing to Cancelled or Completed.
- Terms of sale reachable from the home page and a privacy policy published.
- A test COD order placed from a phone, then cancelled to check that the stock comes back.




