Recover abandoned carts on WooCommerce with push
On WooCommerce, InstantPWA can detect an active cart and prompt install specifically for shoppers who added items but didn't check out. Once installed, a push notification follow-up reminds them to finish — set up once in header.php (via WordPress) via Appearance → Theme File Editor → header.php, or WPCode.
Steps
- 1
Open header.php (via WordPress)
Go to Appearance → Theme File Editor → header.php, or WPCode.
- 2
Paste the InstantPWA snippet
Drop the one-line async script tag in the WooCommerce head section — no build step or dependency install.
- 3
Turn on cart-based targeting
In InstantPWA's targeting rules, scope a trigger to pages/state that indicate an active WooCommerce cart.
- 4
Set the push follow-up delay
Configure how long to wait after cart abandonment before sending the push reminder — commonly 1–24 hours.
- 5
Test the full flow
Add an item to cart, leave without checking out, install when prompted, and confirm the follow-up push arrives.
Constraints to know
- Runs on any WordPress 5.0+ store; the snippet loads after WooCommerce's own cart-fragments.js, so there's no race condition reading cart state from localStorage.
- Compatible with both classic and WooCommerce Blocks (React-based) checkout since it never touches the checkout app itself, only the surrounding theme header.
FAQ
How does InstantPWA know a cart was abandoned?+
It reads WooCommerce's standard cart state (cookie or localStorage) to detect an active cart with no completed order, then scopes the install/push trigger to that condition.
Does this require a separate app or API integration?+
No — it's the same one-line snippet, just with cart-based targeting rules turned on in your dashboard.
Can I control how long to wait before the reminder push?+
Yes — the delay is configurable in the InstantPWA dashboard, from immediate to 24+ hours after abandonment.