LostChurn Docs
Integrations

WooCommerce Plugin

Install the LostChurn WordPress plugin to recover failed WooCommerce Subscriptions payments automatically.

The LostChurn WooCommerce plugin hooks into WooCommerce Subscriptions to detect payment failures in real time and recover them using AI-optimized retry scheduling and personalized dunning.

What You Get

After installation, the plugin adds:

  • Recovery Status Meta Box -- Appears on every WooCommerce order edit screen showing the current recovery status (Active, Recovered, Churned), retry attempts, dunning emails sent, and a link to the full timeline in LostChurn.
  • Dashboard Widget -- A "LostChurn Recovery Summary" widget on your WordPress admin dashboard showing failed payments, recovery rate, and revenue recovered in the last 30 days.
  • Settings Page -- Configure your API key, webhook secret, and enable/disable recovery under LostChurn > Settings.
  • One-Click Retry -- Trigger a manual retry from any order's meta box without leaving WordPress. Status polling updates the result via AJAX.

Requirements

Before installing, confirm your environment meets these requirements:

RequirementMinimum Version
WordPress6.0
WooCommerce5.0
WooCommerce SubscriptionsActive license required
PHP7.4
HTTPSRequired on your site

The plugin declares HPOS (High-Performance Order Storage) compatibility, so it works with both the legacy post-based storage and the new custom order tables.

Installation

From the WordPress Plugin Directory

  1. In your WordPress admin, go to Plugins > Add New.
  2. Search for LostChurn.
  3. Click Install Now, then Activate.

Manual Upload

  1. Download the plugin ZIP from your LostChurn dashboard under Settings > Integrations > WooCommerce.
  2. In WordPress, go to Plugins > Add New > Upload Plugin.
  3. Upload the ZIP file and click Install Now, then Activate.

If WooCommerce is not installed, the plugin displays an admin notice with a link to install WooCommerce. The plugin will not activate without WooCommerce present.

Enter Your API Key

  1. In your LostChurn dashboard, go to Settings > Integrations and click Connect WooCommerce.
  2. Copy the generated API Key and Webhook Secret.
  3. In WordPress, go to LostChurn > Settings.
  4. Paste the API Key and Webhook Secret.
  5. Enter your LostChurn Workspace ID (found under Settings > General in your LostChurn dashboard).
  6. Click Save and Verify. The plugin tests the credentials and confirms the connection.

Webhook Auto-Registration

The plugin automatically registers webhooks with WooCommerce during activation:

Webhook TopicEndpoint
subscription.payment_failedhttps://webhooks.lostchurn.com/v1/woocommerce
subscription.renewal_failedhttps://webhooks.lostchurn.com/v1/woocommerce
subscription.status_updatedhttps://webhooks.lostchurn.com/v1/woocommerce
order.updatedhttps://webhooks.lostchurn.com/v1/woocommerce

All payloads are signed with your webhook secret. LostChurn verifies the X-WC-Webhook-Signature header using HMAC-SHA256 on every request.

The plugin also hooks into woocommerce_subscription_payment_failed for instant, real-time failure detection before the webhook delivery cycle.

How Recovery Works

  1. Detection -- A subscription renewal payment fails. The plugin sends the event to LostChurn immediately.
  2. Analysis -- LostChurn extracts the decline code from your payment gateway (Stripe, PayPal, Braintree, etc.) and determines the optimal strategy.
  3. Smart Retry -- LostChurn schedules retries at ML-optimized times via the WooCommerce REST API. WooCommerce re-attempts the charge through your original gateway.
  4. Dunning -- In parallel, LostChurn sends personalized recovery emails (and optional SMS) with a payment update link.
  5. Resolution -- When the payment succeeds, WooCommerce fires a success event and LostChurn marks the recovery complete.

If you use WooCommerce's built-in automatic retry rules, disable them to avoid conflicts. Go to WooCommerce > Settings > Subscriptions and set Automatic Retry to Disabled.

Payment Gateway Compatibility

LostChurn works with any gateway that WooCommerce Subscriptions supports for automatic renewals:

  • Stripe (via WooCommerce Stripe Gateway)
  • PayPal (via WooCommerce PayPal Payments)
  • Braintree
  • Square
  • Authorize.Net
  • GoCardless

Decline codes from each gateway are mapped to LostChurn's unified decline taxonomy for consistent recovery strategies.

Troubleshooting

Plugin activation fails

  • Confirm WooCommerce is installed and activated.
  • Confirm PHP 7.4 or later is running (phpinfo() or Tools > Site Health).
  • Check that WooCommerce Subscriptions has an active license.

"Invalid API Key" on save

  • Copy the API key again from your LostChurn dashboard. Ensure no extra spaces were included.
  • Confirm the key is for the correct workspace.

Webhooks not delivering

  1. Go to WooCommerce > Settings > Advanced > Webhooks and check that LostChurn webhooks are listed with status "Active."
  2. If webhooks are missing, deactivate and reactivate the plugin to re-register them.
  3. Verify your site is reachable over HTTPS from the public internet. Localhost and .local domains cannot receive webhooks.

Staging environments

Install the plugin on staging with a separate API key. LostChurn detects staging environments and labels events accordingly. Test events do not affect production analytics.

Multisite support

The plugin supports WordPress Multisite. Each site in the network requires its own API key and workspace connection. Network-wide activation is supported.

Next Steps

On this page