The plugin
WooCommerce plugin 1.0.0 passes its tests, and bolrach-push goes up on WordPress.org once the publishing account exists.
Install
- Upload the
bolrach-pushfolder to/wp-content/plugins/and activate it. - At bolrach.com/push, make an app, then make a server key with Push access at bolrach.com/developers/keys.
- 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.
- 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 WooCommerce | Push event |
|---|---|
| Checkout completes, classic or block checkout | order.placed |
| Payment completes | order.paid |
| The status changes to completed | order.shipped |
| A refund is created | order.refunded |
| The cart changes, for a signed-in customer or a browser the SDK knows | cart.updated or cart.cleared |
| A product's price is lower than the last one seen | catalog.price_changed |
| Stock status changes to in stock or out of stock | catalog.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.