Zum Inhalt springen

Configuration

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Recover ships with sensible defaults, so configuration is optional. Everything lives on one screen, WooCommerce → Recover, stored as a single array in the recover_settings option. The fields fall into three sections: General, Timing and Recovery email.

  • Enable cart recovery (enabled, on by default), the master switch. When off, no carts are snapshotted, the cron worker exits early, and the carts screen shows a warning notice. Existing data is kept.
  • Capture guest carts (capture_guests, on by default), record carts and emails from visitors who are not logged in. When off, the checkout capture script is not enqueued and guest snapshots are skipped; only logged-in customers are tracked.
  • Require consent (require_consent, on by default), only store a guest email after they tick a consent checkbox at checkout. With consent off, a guest email is captured without the tick. Recommended on for GDPR.
  • Consent checkbox label (consent_label), the wording shown next to the consent checkbox the capture script injects at checkout. Applies only when Require consent is on. Blank uses the default: “Email me a link to recover my cart if I do not complete my order.”

Logged-in customers’ emails are read from their account automatically, so Require consent and the consent label apply to the guest checkout field only.

  • Mark abandoned after (minutes) (abandon_after, default 60, minimum 5), minutes of inactivity before a pending cart is flagged abandoned. Values below 5 are clamped to 5. Shorter windows reach shoppers sooner but risk emailing someone still browsing.
  • Email delay (minutes) (email_delay, default 30, minimum 0), minutes to wait after a cart becomes abandoned before the recovery email goes out. Set to 0 to email as soon as a cart is abandoned.

Because the worker runs hourly, both values are effective in roughly one-hour granularity, a 5-minute window does not mean a 5-minute email; the next scheduled run picks it up.

Each field is plain text. Leave any field blank to use the built-in default, which is shown as the field’s placeholder so the zero-config wording is visible without saving.

  • Subject (email_subject), default “You left something in your cart”.
  • Heading (email_heading), the large heading at the top of the email body. Default “Still thinking it over?”.
  • Body text (email_body), the message above the restore button. Default “We saved your cart for you. Click the button below to pick up right where you left off.”.
  • Button label (email_button), text on the restore button. Default “Complete my order”.

The email is sent as HTML through wp_mail. The template is bundled with the plugin and is not theme-overridable, there is no yourtheme/recover/ lookup. To change the markup or styling, use the recover/email/args filter (below) or override the message text it builds. The accent colour is a warm amber set inline for mail-client safety.

recover/email/args runs just before wp_mail, letting add-ons rewrite the recipient, subject, message HTML or headers, for example to inject a recovery coupon:

add_filter( 'recover/email/args', function ( array $args, $cart ) {
// $args = ['to' => ..., 'subject' => ..., 'message' => ..., 'headers' => [...]]
// $cart is a Recover\Model\AbandonedCart (read-only: email, token, cartTotal, itemCount, currency...).
$args['subject'] = sprintf( 'Your cart is waiting, here is 10%% off (%d items)', $cart->itemCount );
return $args;
}, 10, 2 );

This is the only merchant/developer-facing hook in the plugin.

  • Snapshots are taken on woocommerce_add_to_cart, woocommerce_cart_updated and woocommerce_cart_item_removed; you cannot disable individual triggers.
  • A cart is marked recovered the moment an order is placed for that session/user, and also when the restore link is clicked, even if the order is not then completed, because the shopper returned via your link.
  • Exactly one recovery email is sent per cart. There is no multi-email sequence, resend interval or per-cart email cap in the free edition.

Recovery emails are sent on a WordPress cron schedule (the recover_process_carts hook, hourly). Each run first marks carts inactive past your window as abandoned, then emails a recovery link to any abandoned cart that is due, has an email, and has consent. The worker is idempotent, a flag on the row gates the send, so a re-run never double-sends.

  • Settings: the recover_settings option (array). Schema version: the recover_db_version option.
  • Carts: a single custom table, {prefix}_recover_carts, in your own database.

Nothing is sent to any external service. See How it works for the full lifecycle and the privacy model.