Send WhatsApp order updates from WooCommerce
Create a WooCommerce webhook for order events pointing at a receiver, such as an n8n workflow or a small PHP route. The receiver verifies WooCommerce's signature, checks the customer agreed to WhatsApp messages, and sends an approved template through the Cloud API with the connected number's phone number id and token.
WooCommerce disables a webhook after more than five consecutive delivery failures.
Header carrying a base64 encoded HMAC-SHA256 of the payload, made with the webhook's secret.
Outside a customer service window, only pre-approved template messages can be sent.
How does a WooCommerce order trigger a WhatsApp message?
Through a WooCommerce webhook and a receiver. In WooCommerce, Settings, Advanced, Webhooks, add a webhook with an order topic, such as order created or order updated, a delivery URL, and a secret. WooCommerce then posts the order as JSON to that URL every time the event happens.
The payload is fixed, so it cannot be aimed at the Cloud API directly. A receiver sits in between: an n8n Webhook node, a route in the store's own PHP, or any small service. It reads the order, picks the customer's phone number and the details the message needs, and makes one HTTPS request to the Cloud API messages endpoint for the connected number, with the number's access token as a bearer token.
The order.updated topic is not tied to one status, so the receiver should read the order's status field and send once per transition it cares about. WooCommerce delivers in the background through wp-cron by default, so a message can follow the order by a short delay.
How does the receiver know the request came from the store?
From WooCommerce's signature. Each delivery carries an X-WC-Webhook-Signature header, a base64 encoded HMAC-SHA256 of the raw payload computed with the secret you set on the webhook. The receiver computes the same hash over the body it received and compares, and rejects anything that does not match.
This is the store's own secret, so unlike Meta's signature on incoming WhatsApp messages, it can be validated. Compare in constant time, and hash the raw body before any framework parses it, because re-encoded JSON produces a different hash.
Respond quickly with a 2xx. WooCommerce counts any response that is not 2xx, 301 or 302 as a failure, and after more than five failures in a row it disables the webhook. A receiver that is down for a deploy, or slow because it waits on Meta before answering, can switch off the store's messages without anyone noticing.
What can the store send, and when?
An approved template, every time the store writes first. Meta's 24 hour customer service window opens only when the customer messages the number, so an order confirmation or a shipping update is business-initiated and free text is refused. Create a utility template for each update, wait for approval, and send it by name and language with the order number and other details as parameters.
Meta also requires opt-in: the customer gave their number and agreed to hear from this business on WhatsApp. A checkout checkbox stored on the order is the simplest record of it, and the receiver should check it before sending.
Once the customer replies, the conversation is ordinary Coexistence. The reply appears in the WhatsApp Business app on the store's phone, the window is open for free text, and the team answers from the app as it always has.
Common mistakes
- Doing the Cloud API call before answering WooCommerce. A slow or failed send counts against the webhook, which is disabled after more than five failures.
- Hashing parsed JSON instead of the raw body. The signature never matches and every genuine delivery is rejected.
- Sending on every order.updated delivery. The topic is not tied to one status, so without tracking which transition was already messaged, customers get duplicates.
Connect the store's number at easycoexistence.com and give the receiver its phone number id and token from the dashboard. From US$ 9 per number per month, falling to US$ 1 as you add numbers, with the first 3 days free.
Frequently asked questions
Do I need a WordPress plugin for this?
No. WooCommerce's built-in webhooks and a receiver are enough, and the receiver can be a route in the same PHP application.
Who pays for the order messages?
Meta bills messaging directly to the business on its own WhatsApp Business Account, and EasyCoexistence never marks it up.
Can the team still use the phone?
Yes. Coexistence keeps the WhatsApp Business app working on the store's number, and the template the store sent shows in the thread.
What if a webhook was disabled?
Fix the receiver, then set the webhook's status back to active in WooCommerce. Orders created while it was off did not trigger a message.
Keep reading
Ready to get started?
Set up WhatsApp Coexistence in minutes, not months. The app keeps working on the phone.
Start Free TrialVerified on