Recovery links
The button in every recovery email is a secure, one-click link that rebuilds the shopper's cart and takes them straight to the checkout.
What happens when a shopper clicks
- The link is checked
The link is your store's address with
?siteryn-recover=…added. Only a normal browser visit is handled: link checkers, prefetchers and well-known scanners and bots are sent to the cart page with nothing restored. The plugin then checks the token, its expiry and the cart's status on the server. - The cart is rebuilt
The shopper's current cart is emptied, and each saved product is added back through WooCommerce, with the same variations and any extra item data.
- Stock is respected
Deleted, unpublished, unpurchasable or out-of-stock products are left out. Quantities are lowered to what's in stock.
- Straight to checkout
The shopper lands on the Checkout page with a short message. For guests, the billing email (and first name) is filled in for them. The token is not kept in the address bar.
- The recovery is confirmed
The page the shopper lands on sends one small request back to your own site. Only then does the cart turn Recovered. If that request never arrives, an order placed from the restored cart confirms it instead.
- Open a real recovery link in a private window
- Checkout with the "Welcome back! Your cart has been restored." notice
- Order summary showing the restored products
Email security scanners
Mail systems such as Microsoft Safe Links, Mimecast or Proofpoint open every link in an email before the customer does, often posing as a normal browser. So a click alone never counts as a recovery:
- Scanners and bots that identify themselves (and requests with no user agent) restore nothing and are simply sent to the cart page.
- A scanner that looks like a browser does rebuild the cart in its own throwaway session, and the timeline shows "Recovery link opened". It never runs the confirmation, so the cart is not marked recovered.
- The cart turns Recovered, and the timeline shows "Cart restored from recovery link", only once the shopper's own browser confirms the visit or an order is placed.
The link keeps working until it expires or the order is paid, so the customer can open it again, for example on another device.
Messages after a restore
| Situation | The shopper sees |
|---|---|
| Everything restored | Welcome back! Your cart has been restored. |
| Some products unavailable | Welcome back! Some products are no longer available and were left out: Product A, Product B. |
| Quantities lowered | We lowered the quantity of Product to what we have in stock. |
Security
Unguessable
Each link holds a random 32-character token. Only a keyed hash is stored, never the token itself.
Expiring
Links stop working after Recovery Link Valid For (7 days by default) and once the order is placed.
Never signs in
A link only restores the cart's contents. It never logs anyone in or exposes account data.
Rate limited
5 attempts per link and 30 per visitor (IP) every 10 minutes. A double click never restores the same cart twice in parallel.
- Each new email issues a fresh token that replaces the old one. With Pro, every campaign email has its own token, so links in earlier emails keep working.
- Changing your site's security salts in
wp-config.phpinvalidates every outstanding link. - The link page sends no-cache headers and a
no-referrerpolicy, so the token never leaks to other sites. - Links are built in the cart's language, so WPML and Polylang language prefixes work.
When a link doesn't work
If a link can't restore the cart, the shopper is sent to the Cart page with a clear, friendly notice. They are never shown an error page.
| Reason | The shopper sees |
|---|---|
| Expired, or the cart is closed | This cart link has expired, so your saved items could not be restored. You can add them again from the shop. |
| Unknown token, or the order was already placed | This cart link no longer works. The order may already have been placed, or the link was changed. You can keep shopping from here. |
| Belongs to another signed-in account | This cart link belongs to a different account. Please sign out, then open the link from your email again. |
| No product could be restored | Sorry, the products in your saved cart are no longer available. |
| Too many attempts | Too many attempts. Please wait a few minutes, then open the link from your email again. |
Page caching
Recovery links work with page caching out of the box: they send no-cache headers and DONOTCACHEPAGE. If your cache or CDN is very aggressive, exclude URLs that contain these query strings:
siteryn-recover siteryn-recover-error siteryn-unsubscribe
The last one is the unsubscribe page, a separate link that is signed differently. It also sends no-cache and no-index headers.
For developers
Send shoppers to the cart instead of the checkout, or change how lines are restored:
// Land on the cart page instead of the checkout.
add_filter( 'siteryn_abandoned_cart_recovery_redirect', function ( $url, $cart ) {
return wc_get_cart_url();
}, 10, 2 );
To count human returns, listen to siteryn_abandoned_cart_recovery_confirmed rather than siteryn_abandoned_cart_link_opened, which scanners can trigger too. To treat another user agent as a scanner, add it with siteryn_abandoned_cart_link_scanner_agents. See the Hooks reference for siteryn_abandoned_cart_restorable_line, siteryn_abandoned_cart_cart_restored and more.