WooCommerce new order notifications on your phone.

Get a push notification with the customer, total and item count every time a new order is placed in your WooCommerce store.

order.createdE-commerceOrders
How it works

Three steps to your first push

STEP 01

Install the recipe

One click in Studio gives you a personal webhook URL.

STEP 02

Paste your URL into WooCommerce

Add it as a webhook for Order created.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the WooCommerce order created webhook

  1. Click Install in Studio and sign in. The recipe is added to your account and you get a personal webhook URL.
  2. In your WordPress admin, go to WooCommerce > Settings > Advanced > Webhooks and click Add webhook.
  3. Set Status to Active, Topic to Order created, and API version to WP REST API Integration v3.
  4. Paste your webhook URL as the Delivery URL and save. WooCommerce sends a ping right away to confirm it works.https://••••••••/•••••••• your personal URL, shown after install
The code

What runs when the webhook arrives

Studio calls handleRequest(request) with the incoming webhook and sends the message it returns. It's yours after install; change anything.

transform.js
1// WooCommerce → order.created
2// Docs: https://woocommerce.com/document/webhooks/
3//
4// Add a webhook under WooCommerce > Settings > Advanced > Webhooks with the topic
5// "Order created" and API version v3, pointing at your integration's endpoint URL.
6
7// WooCommerce prices are decimal strings ("49.00"). Returns null when there's no amount.
8function money(amount, currency) {
9 const value = Number(amount)
10
11 if (amount == null || amount === "" || !Number.isFinite(value) || !currency) return null
12
13 try {
14 return new Intl.NumberFormat("en-GB", { style: "currency", currency }).format(value)
15 } catch {
16 return `${amount} ${currency}`
17 }
18}
19
20// Header names can arrive in any case.
21function header(request, name) {
22 const headers = request.headers || {}
23 const key = Object.keys(headers).find((k) => k.toLowerCase() === name)
24 const value = key ? headers[key] : null
25 return Array.isArray(value) ? value[0] : value
26}
27
28// X-WC-Webhook-Source is your store's URL, e.g. "https://shop.example.com/".
29function adminUrl(request, path) {
30 const source = header(request, "x-wc-webhook-source")
31 return typeof source === "string" && /^https?:\/\//.test(source)
32 ? source.replace(/\/?$/, "/") + "wp-admin/" + path
33 : null
34}
35
36function handleRequest(request) {
37 const body = request.body && typeof request.body === "object" ? request.body : {}
38
39 // Saving a webhook makes WooCommerce send a ping (just a webhook_id); confirm it quietly.
40 if (body.webhook_id && !body.id) {
41 return {
42 title: "🔔 WooCommerce connected",
43 message: `Webhook #${body.webhook_id} is working`,
44 topic: "WooCommerce",
45 priority: -1,
46 }
47 }
48
49 // Guard: only handle this topic, so other WooCommerce webhooks on this integration stay quiet.
50 const topic = header(request, "x-wc-webhook-topic")
51
52 if (topic && topic !== "order.created") {
53 console.log(`Ignoring WooCommerce topic "${topic}"`)
54 return null
55 }
56
57 const order = body
58
59 if (!order.id || !Array.isArray(order.line_items)) {
60 console.log("Not a WooCommerce order payload — skipping")
61 return null
62 }
63
64 const billing = order.billing ?? {}
65 const customer = [billing.first_name, billing.last_name].filter(Boolean).join(" ") || billing.company || "A guest"
66 const total = money(order.total, order.currency)
67 const number = order.number ?? order.id
68 const link = adminUrl(request, `admin.php?page=wc-orders&action=edit&id=${order.id}`)
69 const items = order.line_items.reduce((sum, item) => sum + (Number(item.quantity) || 0), 0)
70 const via = order.payment_method_title ? ` via ${order.payment_method_title}` : ""
71 // order.created fires at checkout, before some payment methods have finished.
72 const waiting = {
73 pending: " (awaiting payment)",
74 "on-hold": " (on hold)",
75 failed: " (payment failed)",
76 }[order.status] ?? ""
77
78 return {
79 title: `🛒 New order #${number}${waiting}`,
80 message:
81 `${customer} ordered ${items} item${items === 1 ? "" : "s"}` +
82 (total ? ` for ${total}` : "") +
83 via,
84 topic: "WooCommerce",
85 priority: 1, // High — a sale is worth surfacing promptly
86 sound: "cashregister",
87 buttons: link ? [{ cta: "View order", url: link }] : [],
88 }
89}
Payload

The WooCommerce order.created webhook

This is what WooCommerce sends to your URL for order created. It is a sample, trimmed to the fields recipes use.

order.created · sample.json
1{
2 "id": 1234,
3 "total": "49.00",
4 "number": "1234",
5 "status": "processing",
6 "billing": {
7 "email": "[email protected]",
8 "company": "",
9 "country": "NL",
10 "last_name": "Doe",
11 "first_name": "Jane"
12 },
13 "currency": "EUR",
14 "total_tax": "8.50",
15 "line_items": [
16 {
17 "id": 1,
18 "name": "Enamel Pin",
19 "total": "24.00",
20 "quantity": 2,
21 "product_id": 101
22 },
23 {
24 "id": 2,
25 "name": "Sticker Pack",
26 "total": "16.50",
27 "quantity": 1,
28 "product_id": 102
29 }
30 ],
31 "date_created": "2026-09-28T11:30:00",
32 "payment_method": "mollie_wc_gateway_ideal",
33 "payment_method_title": "iDEAL"
34}
FAQ

WooCommerce new order notifications: questions

Does this work on iPhone and Android?

Yes. Install the JustPush app from the App Store or Google Play and sign in. Every phone signed in to your account gets the notification.

Do I need to write code?

No. Install the recipe in Studio, paste your webhook URL into WooCommerce and you are done. The code is there if you want to change the text, the sound or the buttons.

Can I change what the notification says?

Yes. After install the recipe's code is yours. Edit it in Studio and test it against the sample payload before you save.

What does it cost?

JustPush is free for 30 days. After that it's $19.99 a year, or $39.99 once. There is no extra charge for recipes.

Ready when you are

WooCommerce on your phone in two minutes.

Install the recipe, paste one URL, done. Free for 30 days, no credit card required.