Abuja Digital Studio · Est. 2018
Start a Project
DocsOCartAbandoned cart recovery
Reference

Abandoned cart recovery

OCartorravo.com/docs/ocart/abandoned-cart-recovery

Abandoned cart recovery

OCart captures cart state as soon as the buyer enters an email, then runs a multi-step email plus SMS sequence to win them back.

Capture

OCart_Checkout_Capture listens at the checkout. As soon as an email is entered (debounced at recovery.capture_email_debounce_ms, default 800ms), the cart is persisted to wp_ocart_carts with status='active'. The cart_retention_days setting (default 90) controls how long abandoned carts are kept.

Sweep

The ocart/cart/sweep Action Scheduler job runs every 5 minutes. It transitions carts that have been inactive past the configured threshold from active to abandoned, then opens a recovery_run row pointing at the matched sequence.

Sequences

A sequence is a row in wp_ocart_recovery_sequences with trigger_type of cart_abandoned, checkout_abandoned, or browse_abandoned. Steps live in the steps JSON column. Each step picks a channel (email, SMS, push, whatsapp) and a wait duration.

Dispatcher

OCart_Recovery_Dispatcher runs every 60 seconds via the ocart/recovery/dispatch Action Scheduler hook. It walks wp_ocart_recovery_runs rows with status='pending', sends the next step through OCart_Recovery_Channels, then schedules the wait for the following step.

Deliverability

Every send, delivery, open, click, bounce, complaint, and unsubscribe lands in wp_ocart_deliverability_events with a hashed recipient. OCart sets RFC 8058 List-Unsubscribe-Post headers on every email and maintains a suppression list (wp_ocart_suppression) shared across email and SMS.

One-click unsubscribe

Unsubscribe links carry a nonced token; OCart_Recovery::maybe_handle_unsub() writes the recipient hash to the suppression table on hit. Subsequent sends to the same recipient are blocked at the dispatcher.

Merge tags

Recovery templates support merge tags for cart items, totals, customer name, and a resume link that drops the buyer back into the same cart.

Native A/B testing

Recovery emails and SMS are A/B testable. Tests use surface='recovery_email' or surface='recovery_sms' in wp_ocart_tests.

Abandoned cart recovery · OCart Docs | Orravo