WooCommerce new customer notifications on your phone.

Get a low-priority push notification when someone creates a customer account in your WooCommerce store.

customer.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 Customer 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 customer 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 Customer 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 → customer.created
2// Docs: https://woocommerce.com/document/webhooks/
3//
4// Add a webhook under WooCommerce > Settings > Advanced > Webhooks with the topic
5// "Customer 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 !== "customer.created") {
53 console.log(`Ignoring WooCommerce topic "${topic}"`)
54 return null
55 }
56
57 const customer = body
58
59 if (!customer.id || !customer.email) {
60 console.log("Not a WooCommerce customer payload — skipping")
61 return null
62 }
63
64 const name = [customer.first_name, customer.last_name].filter(Boolean).join(" ")
65 const country = customer.billing?.country ? ` from ${customer.billing.country}` : ""
66 const link = adminUrl(request, `user-edit.php?user_id=${customer.id}`)
67
68 return {
69 title: "👤 New customer",
70 message: (name ? `${name} (${customer.email})` : customer.email) + ` created an account${country}`,
71 topic: "WooCommerce",
72 priority: -1, // Low — nice to know, nothing to do
73 buttons: link ? [{ cta: "View customer", url: link }] : [],
74 }
75}
Payload

The WooCommerce customer.created webhook

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

customer.created · sample.json
1{
2 "id": 42,
3 "role": "customer",
4 "email": "[email protected]",
5 "billing": {
6 "email": "[email protected]",
7 "country": "NL",
8 "last_name": "Lee",
9 "first_name": "Sam"
10 },
11 "username": "samlee",
12 "last_name": "Lee",
13 "first_name": "Sam"
14}
FAQ

WooCommerce new customer 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.