WooCommerce

The Bolrach Push plugin puts web push on a WooCommerce storefront and sends the store's orders, carts, price drops and stock changes to Push as events. The shop recipes then send the reminders and updates.

The plugin

WooCommerce plugin 1.0.0 passes its tests, and bolrach-push goes up on WordPress.org once the publishing account exists.

Install

  1. Upload the bolrach-push folder to /wp-content/plugins/ and activate it.
  2. At bolrach.com/push, make an app, then make a server key with Push access at bolrach.com/developers/keys.
  3. In WordPress, open Settings, then Bolrach Push, and paste the app id and the key. The key stays on the server and never reaches a page.
  4. In the Push console, add the store's origin under Allowed origins and make Web Push keys.

The plugin loads the pinned web SDK from cdn.bolrach.com with its integrity hash and serves the service worker from the site root, /bolrach-push-sw.js.

What becomes an event

In WooCommercePush event
Checkout completes, classic or block checkoutorder.placed
Payment completesorder.paid
The status changes to completedorder.shipped
A refund is createdorder.refunded
The cart changes, for a signed-in customer or a browser the SDK knowscart.updated or cart.cleared
A product's price is lower than the last one seencatalog.price_changed
Stock status changes to in stock or out of stockcatalog.restocked or catalog.out_of_stock

A signed-in customer is the Push user woo:<customer id>. A guest's browser is tied to the cart by an anonymous id cookie, so an abandoned cart still reaches it. Events go out in one POST /events:batch after the page is served, each with a stable idempotency key, so a retried request counts once.

Then turn on the recipes you want, as the online shop guide shows.

Machine-readable: openapi.json. Console: bolrach.com/push.