WooCommerce plugin

WooCommerce SMS & WhatsApp plugin: confirm your COD orders in Morocco

envoisms-woocommerce is EnvoiSMS.ma's official WordPress plugin. It does two things, each optional: it has every cash-on-delivery order confirmed over WhatsApp, from your own number, with two buttons — Confirm / Cancel — whose tap updates the order by itself; and it texts the customer when the order moves to Processing and then to Completed.

wp-content/plugins/envoisms-woocommerce
# 1. Installer le plugin (zip GitHub ou clone) cd wp-content/plugins git clone https://github.com/envoisms/envoisms-woocommerce.git # 2. Extensions → activer « EnvoiSMS for WooCommerce » # 3. WooCommerce → EnvoiSMS Maroc → coller la clé API, enregistrer # 4. Confirmation COD : cocher « Activer », enregistrer, # puis « Créer les modèles WhatsApp » (français et arabe) # Prérequis : WooCommerce 7.1+, PHP 8.0+, HTTPS public
● Routes locales MarocIAM • Inwi • Orange
https://api.envoisms.ma/v1
Local Routes
Maroc Telecom (IAM) • Inwi • Orange
Verified DLR Receipts
HMAC-SHA256 Signed
Clear MAD Pricing
dès 0,60 MAD/SMS • 5 MAD offerts

WhatsApp COD confirmation, order by order

When a customer checks out with cash on delivery, the order waits in "Awaiting confirmation" (stock is held) while the customer receives, from your WhatsApp number, a message with two buttons. A "WhatsApp" column in the order list tracks each step.

  • Confirm → the order moves to Processing, with a WhatsApp thank-you and no duplicate SMS
  • Cancel → the order is flagged for you, or cancelled with stock returned if you chose automatic cancellation
  • No reply after N hours → one reminder; still nothing → "No reply — call them", with an optional SMS to the customer
  • WhatsApp refused the send (number not connected, template not approved…) → "WhatsApp failed", with an optional SMS

A reply cannot be forged

Enabling COD registers your site with EnvoiSMS (POST /v1/webhooks, event message.inbound) and stores the signing secret it returns. Each customer reply reaches /wp-json/envoisms/v1/webhook signed with HMAC-SHA256 in the X-EnvoiSMS-Signature-256 header; a bad signature, or one older than 5 minutes, is refused.

  • A reply is accepted only from the order's own billing number
  • Each button carries a tag derived from the order key, so a payload cannot target another order
  • A second tap, or a webhook retry, never changes an order already confirmed or cancelled

Order status SMS

Two messages, each editable: when the order moves to Processing and when it is Completed. Leave one empty to send nothing.

  • Variables: {first_name}, {last_name}, {order_id}, {order_total}, {billing_city}
  • Your branded Sender ID (the sender name you registered)
  • Numbers normalised to E.164 from the billing country (06…, +212…, 00212…)
  • Every send carries an Idempotency-Key, so a status hook that fires twice sends one message

Requirements

For COD confirmation: your WhatsApp number connected in your EnvoiSMS.ma dashboard (with coexistence you keep using the WhatsApp Business app on your phone), the confirmation template approved, and your site reachable over public HTTPS. Order SMS need only your API key.

  • WooCommerce 7.1+ and PHP 8.0+
  • Compatible with High-Performance Order Storage (HPOS)
  • The template is created from the plugin settings ("Create the WhatsApp templates" button, French and Arabic); EnvoiSMS reviews it and submits it to Meta, and its status shows on the same page

Install in five steps

The plugin installs like any WordPress plugin, then is configured from WooCommerce.

  • Download the plugin zip from GitHub, or clone the repository into /wp-content/plugins/envoisms-woocommerce.
  • Activate "EnvoiSMS for WooCommerce" under Plugins.
  • Go to WooCommerce → EnvoiSMS Maroc.
  • Enter your API key from the EnvoiSMS.ma dashboard and save.
  • For COD confirmation: tick "Enable", save, then click "Create the WhatsApp templates".
  • Source code: github.com/envoisms/envoisms-woocommerce
  • MIT licence, no plugin subscription: you pay for the messages you send, in dirhams

Everything you need to know about WooCommerce plugin.

Is the plugin free?
Yes. The plugin is open source under the MIT licence. You pay only for the SMS and WhatsApp messages actually sent, debited from your prepaid balance in dirhams.
Do I need a WhatsApp Business number to use the plugin?
Only for COD confirmation, which is sent from your own number. Order status SMS work with your API key alone.
What happens if the customer doesn't reply on WhatsApp?
After the delay you choose, the customer gets one reminder. With still no reply after a second delay, the order stays unchanged and is marked "No reply — call them"; you can also have an SMS notice sent to the customer.
Can the plugin cancel an order on its own?
Only if you choose it. By default a tap on Cancel flags the order for you to decide; with automatic cancellation it moves to Cancelled and the stock is returned.
Can I test before going live?
Yes. An env_test_ sandbox key replays the whole sending path without delivering or debiting anything, and 5 MAD of real credit comes with signup for your first live sends.

Ready to integrate with WooCommerce plugin?

Create your account in under 2 minutes. Get 5 MAD of free credit instantly to test the API.