WooCommerce push notifications: setup and playbook
WooCommerce runs on WordPress, so you control your site root — the one thing web push needs. Setup takes about five minutes; the store playbook is what makes it pay.
- Upload sw.js to the folder with wp-config.php and add one script tag to your header.
- Exclude sw.js and the snippet from caching, minify and “delay JavaScript” features.
- Ask for permission where intent is highest: product pages and order confirmation.
- Plan a simple weekly rhythm: new arrivals, an offer, restocks, win-back.
Setup in three steps
- Add your store in the Pusharoo dashboard and copy your site key.
- Upload
sw.jsto your WordPress root (the folder containingwp-config.php) via your host’s File Manager or SFTP. Checkhttps://yourstore.com/sw.jsopens. - Add the snippet before
</head>using your theme’s header, a block theme template part, or a header/footer code plugin:
<script src="https://pusharoo.com/sdk/pusharoo.js" data-site="pk_your_site_key" async></script>Full WordPress details are in the WordPress guide and docs.
Caching and optimisation plugins
| Plugin type | What to exclude |
|---|---|
| Page cache (WP Rocket, LiteSpeed Cache, W3TC…) | /sw.js from caching |
| Minify / combine JS | sw.js and pusharoo.js |
| Delay / defer JavaScript | pusharoo.js (otherwise the prompt never loads) |
| CDN (Cloudflare etc.) | Bypass cache for /sw.js and your manifest |
Where to ask in a WooCommerce store
- Out-of-stock products: a “Notify me when it’s back” button that calls
Pusharoo.subscribe(). - Product pages: a quiet bell or “Get deal alerts” link near the price.
- Order received page: “Want restock and sale alerts?” — buyers are your warmest audience.
- Blog/lookbook pages: the delayed soft prompt after a scroll.
<!-- e.g. in a single-product template or a Custom HTML block -->
<button class="button" onclick="Pusharoo.subscribe()">🔔 Notify me about restocks</button>A weekly campaign rhythm
| Week | Campaign | Segment |
|---|---|---|
| 1 | New arrivals | Seen in the last 30 days |
| 2 | 48-hour offer | Everyone |
| 3 | Restocks and bestsellers | Mobile shoppers |
| 4 | Win-back | Inactive 30+ days |
Segments and scheduling are explained in segmentation; offer ideas in ecommerce push.
iPhone shoppers
Many WooCommerce stores get most traffic from phones. For iPhone shoppers to subscribe, add a web app manifest and Apple meta tags to your theme header and set data-ios-hint="true" on the snippet, so iPhone visitors see “Share → Add to Home Screen” instead of a prompt that can’t work (manifest guide).
Get started
create a free account, add your store’s address, and follow the steps above. The whole setup typically takes a few minutes, and there’s no subscriber limit as your store grows.
The two lines that power automations
// in your child theme’s JS (WooCommerce triggers this jQuery event after AJAX add-to-cart)
jQuery(document.body).on('added_to_cart', function () { Pusharoo.track('added_to_cart'); });
// on the order-received (thank-you) page, e.g. via the woocommerce_thankyou hook
Pusharoo.track('purchase');Product pages without AJAX add-to-cart redirect to the cart; call the event on the cart page load instead.
Order updates from PHP
For “your order has shipped”, save the shopper’s Pusharoo subscriber ID with the order (your subscribe webhook receives subscription_id), then call POST /api/v1/notify from a woocommerce_order_status_completed hook using wp_remote_post(). Keep the API key in wp-config.php, not in the database or theme.
Cart reminders on WooCommerce (and what isn’t automatic)
Pusharoo isn’t a WooCommerce plugin and doesn’t read your orders by itself. Cart reminders work through events: fire Pusharoo.track('added_to_cart') from WooCommerce’s added_to_cart jQuery event and Pusharoo.track('purchase') on the order-received page, then build an automation “added_to_cart → wait 1 hour → reminder, stop if purchase”. Order or back-in-stock notices can be sent from your server with the REST API (POST /api/v1/notify). Details in abandoned cart push.
Questions
Is there a Pusharoo WooCommerce plugin?
Not currently. Setup is a file upload and one script tag, which works with any WooCommerce theme.
Will push notifications slow down my WooCommerce store?
The snippet loads asynchronously and does nothing until needed, so page rendering isn’t blocked.
Can I send order updates by web push?
Pusharoo focuses on marketing campaigns and automations to segments. Per-order transactional notifications need a system that knows which browser belongs to which customer.
Can I send back-in-stock alerts on WooCommerce?
Yes with tags plus the REST API: tag shoppers who click “Notify me” on a product (Pusharoo.tag('wishlist', 'product-123')), then have a stock-status hook call the API to send to that tag when the product is back.
Does it work with block-based checkout?
The snippet runs on every page regardless of checkout type. Fire the purchase event on the order-received page, which exists for both classic and block checkout.
Keep reading
Web push for WordPress and WooCommerce
Upload sw.js, paste one line, exclude it from caching. Works with WooCommerce too.
Push notifications for online stores
Flash sales, back-in-stock, price drops and retargeting — without paying for ads.
Abandoned cart push notifications, honestly explained
What cart reminders need technically, timing and copy, and which tools trigger them — honestly.
Magento 2 push notifications
Where sw.js goes with a pub/ docroot, adding the snippet in admin, Varnish/CDN caching and a push plan.
More in Platforms: Web push on Shopify: what works, honestly · Web push on Wix, Squarespace and Webflow · Web push notifications on BigCommerce · Web push notifications for PrestaShop · Web push notifications for Joomla · Web push notifications for Drupal · Web push notifications for Ghost blogs · All guides
Free for life. No limits.
Unlimited subscribers, campaigns and automations. No badges. About five minutes to install.