How to send WooCommerce order notifications to Slack
WooCommerce does not send Slack-formatted messages by itself. You can connect a WooCommerce webhook to a relay service, build a small custom integration using WooCommerce hooks and Slack’s incoming webhook API, or use a plugin for the fastest setup.
- 01Choose the events to notify
- 02Create a Slack message endpoint
- 03Set up the manual connection
- 04Build the custom-code route
- 05Test failures before going live
- 06Use a plugin for the fast route
What you need
- A WooCommerce store with administrator access
- A Slack workspace where you can install an app or create an incoming webhook
- A test order or staging site
- A code snippet tool or developer if using the custom route
Choose the events to notify
Decide whether Slack should receive every new order, selected order status changes, cancellations, refunds, or all of these. Sending every update can make a busy channel noisy, so start with new orders, cancelled orders, and refunded orders.
Also decide whether notifications should go to one channel or separate channels for sales, fulfilment, and support.
Create a Slack message endpoint
For the direct custom route, create a Slack incoming webhook for the channel that should receive the alerts. Slack expects a POST request with JSON containing a text value, and it also supports richer message blocks. Keep the webhook URL private because anyone who has it can post to that channel.
If you are using an automation service instead, create an incoming webhook trigger there and let that service post the formatted message to Slack.
Set up the manual connection
WooCommerce can send order data to an external delivery URL from WooCommerce > Settings > Advanced > Webhooks. Select an order topic, set the webhook to Active, enter the relay URL, and add a secret. WooCommerce records delivery attempts in WooCommerce > Status > Logs.
Do not paste the Slack incoming webhook URL directly into WooCommerce and expect a useful message. WooCommerce sends its order payload, while Slack expects a message payload with a text field. Put a relay such as an automation workflow between them to map the order number, total, status, and customer-safe details into Slack’s format. This is the simplest no-code manual route.
Build the custom-code route
If you do not want a relay service, ask a developer to add a small integration in a site-specific plugin or custom functionality plugin. Use woocommerce_checkout_order_processed for a newly processed checkout and woocommerce_order_status_changed for later status changes, then send a JSON request with wp_remote_post() to Slack.
The callback should load the order, build a short message, and ignore statuses you do not need. Add duplicate protection if the same order can pass through more than one relevant event. Never put the Slack URL in a publicly visible theme file or expose customer payment details in the message.
Test failures before going live
Create a test order and confirm that the message contains the expected order number, total, status, and admin link. Then change the order to cancelled or refunded and confirm those alerts are routed correctly.
If nothing arrives, check the Slack app is allowed in the target channel, the webhook URL is still valid, and the relay returns a successful response. WooCommerce disables a webhook after repeated delivery failures, so inspect WooCommerce > Status > Logs before repeatedly placing real orders.
Use a plugin for the fast route
For a quicker setup, use ShopMagic Slack. It is designed for real-time WooCommerce alerts covering new orders, cancellations, and refunds, with custom messages and channel routing. Install and activate it, connect the Slack workspace, choose the order events, select the destination channels, and send a test notification.
This route avoids maintaining custom callbacks, payload mapping, and delivery logs yourself. It is usually the better choice if non-developers need to change message wording or routing later.
Let ShopMagic Slack do it
Real-time order, cancellation, and refund alerts in Slack, with customizable messages and channel routing.
Sources
- api.slack.com /incoming-webhooks?utm_source=openai
- woocommerce.com /document/webhooks/?utm_source=openai
- woocommerce.github.io /code-reference/files/woocommerce-includes-class-wc-checkout…
Questions
- Can WooCommerce send order notifications directly to Slack?
- Not in the useful Slack message format by itself. WooCommerce can send order webhooks to a URL, while Slack incoming webhooks expect JSON containing a message such as <code>text</code>. You therefore need a relay that transforms the WooCommerce payload, custom code that formats the request, or a WooCommerce-to-Slack plugin.
- Which WooCommerce events should trigger Slack alerts?
- Start with new orders, cancelled orders, refunded orders, and important payment or fulfilment status changes. A new checkout can be observed with <code>woocommerce_checkout_order_processed</code>, while later changes can be observed with <code>woocommerce_order_status_changed</code>. Filter the statuses you do not need so your Slack channel does not receive duplicate or low-value updates.
- Why did my WooCommerce webhook stop sending notifications?
- A webhook can stop after repeated delivery failures. Check the webhook log under <strong>WooCommerce > Status > Logs</strong>, confirm that the receiving URL returns a successful HTTP response, and verify that the Slack app or relay still has access. WooCommerce can automatically disable a webhook after more than five consecutive failed deliveries.
- Can I send different WooCommerce alerts to different Slack channels?
- Yes, but the routing must be configured by your relay, custom code, or notification plugin. For example, send new orders to sales, cancellations to support, and refunds to finance. A direct WooCommerce webhook does not provide Slack channel routing by itself; the receiving system must decide where each formatted message goes.
- Should I use custom code or a plugin for WooCommerce Slack alerts?
- Use custom code if you only need a few simple alerts and have someone who can maintain the integration. Use a plugin if you need configurable messages, several order events, channel routing, logs, and a setup that store administrators can change without editing PHP. ShopMagic Slack is the quicker route for those requirements.