=== Subscription Toolkit – Cancellation Survey, Win-back & Trial Coupons for WooCommerce Subscriptions ===
Contributors: joelambord
Tags: woocommerce subscriptions, subscriptions, cancellation survey, churn, retention
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 8.0
WC tested up to: 11.1
Stable tag: 1.5.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Reduce churn in WooCommerce Subscriptions: cancellation survey with retention offers, win-back e-mails, free trial coupons and MRR metrics.

== Description ==

Every cancelled subscription is recurring revenue lost. Subscription Toolkit by NAVEST reduces churn in **WooCommerce Subscriptions**: a cancellation survey asks why customers want to cancel and answers with a retention offer – a discount or a free month – right in the cancel flow. Free trial coupons turn visitors into subscribers, and the Pro version adds win-back e-mails and subscription metrics such as MRR and churn rate.

**Features at a glance**

* Cancellation survey in My Account instead of a plain "Cancel" button
* Retention offers per cancellation reason: discount on the next renewals or a free period
* Survey responses and cancellation reasons with filters and CSV export
* "Subscription Trial" coupon type: free trial of X days, weeks or months with a coupon code
* Dashboard: saved cancellations, save rate, trial conversion and revenue
* Multilingual: WPML, Polylang, TranslatePress, Weglot, Loco Translate
* Pro: win-back e-mail sequence with personal discount codes after a subscription ended
* Pro: reminders for unfinished sign-ups whose first payment failed
* Pro: subscription metrics – MRR, churn rate, retention by start month, customer lifetime value

= Cancellation survey with retention offers =

When a customer clicks "Cancel" in My Account, a friendly survey asks why. For each reason you decide what happens next:

* **Free period** – the next payment moves back by days, weeks or months.
* **Discount** – a percentage or fixed discount on the next renewals, applied to the subscription instantly.
* **No offer** – the cancellation is simply confirmed.

Campaigns can target products or categories. Every answer is stored with its outcome, so you see which reasons come up most, which offers work and how much revenue they saved - including free-text answers, filters and CSV export.

= Free trial coupons for WooCommerce Subscriptions =

A "Subscription Trial" coupon type: the customer pays nothing today and the first renewal moves back by the trial length (e.g. 15 days). The cart shows the trial length and the first renewal date. The dashboard tracks how many trials turn into paying subscriptions.

= Dashboard =

Trial conversion, saved cancellations, save rate and revenue at a glance, with a 12-month projection.

= Made for multilingual shops =

The survey popup, the offers and the texts follow each customer's language. Works with WPML, Polylang, TranslatePress and Weglot, respects Loco Translate and ships with English, German, French, Italian and Spanish translations.

= Pro: Win-back e-mails =

Not every cancellation can be prevented. Win-back follows up once the subscription has ended:

* An e-mail sequence of up to six e-mails, each with a personal, single-use discount code.
* One click in the e-mail puts the ended subscription back into the cart with the code applied.
* A "welcome back" banner in My Account.
* Unfinished sign-ups: customers whose first payment failed get their own sequence – a reminder within the hour that leads straight back to the payment, optionally with a code later. They are never treated as cancelled subscribers.
* Contacts, clicks and revenue won back on the dashboard.
* Test mode sends every e-mail to your own address first.

= Pro: Subscription metrics (MRR, churn, retention) =

See how your subscription business develops. The history is built from your existing subscriptions on activation:

* Monthly recurring revenue (MRR), active subscriptions, revenue per subscription and customer lifetime value.
* Gained and lost MRR per month: new, reactivated, upgraded, downgraded and cancelled.
* Churn rate by subscriptions and by revenue, split into cancellations, failed payments and expired terms.
* Retention by start month and the renewals due in the next 30 days.
* Filter by product or variation, CSV export.

Win-back and Metrics are available in the Pro version, which you can buy and install from within the plugin (WooCommerce → Subscription Toolkit).

== Installation ==

1. Install and activate WooCommerce and WooCommerce Subscriptions.
2. Install Subscription Toolkit from Plugins → Add New Plugin and activate it.
3. Open WooCommerce → Subscription Toolkit. Switch modules on or off under Settings.
4. Create your first retention campaign under Retention, or a coupon with the discount type "Subscription Trial".

== Frequently Asked Questions ==

= Which plugins are required? =

WooCommerce 8.0+ and WooCommerce Subscriptions 5.0+. Other subscription plugins are not supported.

= How can I reduce churn in WooCommerce Subscriptions? =

Ask for the reason before a subscription is cancelled and answer it: a customer who finds the subscription too expensive gets a discount on the next renewals, one who needs a break gets a free month. Customers who cancel anyway can be won back with a personal offer later (Pro). The dashboard shows which reasons and offers save the most subscriptions.

= Can I offer a discount or a free month instead of a cancellation? =

Yes. Every cancellation reason can have its own offer: a percentage or fixed discount on a number of renewals, or a free period that moves the next payment back by days, weeks or months. The offer is applied to the subscription instantly when the customer accepts it.

= How do I offer a free trial with a coupon code? =

Create a coupon with the discount type "Subscription Trial" and enter the trial length, e.g. 15 days. Customers who use the code pay nothing today; the first renewal moves back by the trial length.

= Which subscription metrics does the Pro version show? =

Monthly recurring revenue (MRR) over time, gained and lost MRR per month, churn rate and revenue churn, the reasons subscriptions ended (cancellation, failed payment, expired term), retention by start month, customer lifetime value and the renewals due in the next 30 days – filtered by product or variation.

= Does the trial coupon affect the payment gateway? =

No. It only sets the initial total to 0.00 through the standard WooCommerce Subscriptions trial. Gateways that verify or pre-authorize the card at sign-up (Stripe, Payrexx, Braintree, Mollie and others) keep doing so, so the first payment after the trial runs without further action from the customer. A trial started with the coupon also survives checkout retries after a cancelled or failed payment.

= Does it work with other coupon plugins? =

Yes. The coupon type registers through the standard `woocommerce_coupon_discount_types` filter and works, for example, with Smart Coupons for WooCommerce (Pro) by WebToffee.

= Does it work with cache plugins? =

Yes. The popup only appears on My Account pages, which WooCommerce excludes from page caching. With WP Rocket, the popup script is excluded from "Delay JavaScript execution" automatically.

= How do I get the Pro version? =

Click "Upgrade to Pro" in WooCommerce → Subscription Toolkit. After the purchase, download the Pro version from your account there, from the purchase e-mail or from the [Freemius customer portal](https://customers.freemius.com/). Install it under Plugins → Add New Plugin → Upload Plugin and enter your license key when asked. The free version is then switched off automatically; all settings are kept.

== Privacy ==

The plugin stores the answers of the cancellation survey (reason, optional free text, offer and outcome) in your WordPress database, linked to the subscription. You can delete them under WooCommerce → Subscription Toolkit → Responses. It also remembers the language a customer used at checkout and in My Account, to answer in that language.

Win-back (Pro) stores a contact per ended subscription or unfinished sign-up (customer, e-mail address, e-mails sent, clicks, personal code) to run the e-mail sequence and to count customers won back. Metrics (Pro) stores the changes of each subscription's monthly amount (subscription, customer, product, amount, date) to calculate MRR, churn and retention. No data is sent to third parties by these modules. Everything stays within your WordPress environment.

== External services ==

This plugin uses the [Freemius](https://freemius.com/) SDK for licensing, updates of the Pro version and the in-dashboard upgrade.

* **Opt-in:** after activation, the plugin asks whether you want to connect to Freemius for update notifications. If you agree, your name and e-mail address, the site URL and the WordPress, PHP and plugin versions are sent; the list of plugins and themes only if you allow it. Nothing is sent if you skip.
* **License activation and purchase:** when you enter a license key or open the pricing page, the license key and the site URL are sent to Freemius, and the checkout is loaded from Freemius.

Freemius: [Terms of Service](https://freemius.com/terms/), [Privacy Policy](https://freemius.com/privacy/).

== Screenshots ==

1. Dashboard: trial conversion, saved cancellations, save rate and revenue at a glance – with a 12-month projection.
2. Cancellation survey: a friendly exit survey replaces the plain "Cancel" link in My Account.
3. Retention offer: the right offer for the chosen reason – a free period or a discount on the next renewals, applied instantly.
4. Retention campaigns: link every cancellation reason to its own offer and target campaigns by product or category.
5. Survey responses: filter by campaign, reason, outcome and date, read free-text answers and export to CSV.
6. Win-back e-mail (Pro): a personal offer with a unique, single-use code after a subscription has ended.
7. My Account banner (Pro): former subscribers see their personal offer and restart with one click.
8. Win-back sequence (Pro): up to six e-mails with delay, subject, text and offer – plus test e-mails in every language.
9. Win-back contacts (Pro): e-mails sent, clicks, personal codes, status and the revenue won back.
10. Subscription metrics (Pro): MRR over time, gained and lost MRR per month, churn by reason and retention by start month.
11. Trial coupons: the "Subscription Trial" coupon type – nothing to pay today, the first renewal moves back by the trial length.
12. Translations: popup, banner and e-mails follow each customer's language (WPML, Polylang, TranslatePress, Weglot, Loco Translate).

== Changelog ==

= 1.5.2 =
* Fix: without WooCommerce Subscriptions (or WooCommerce), opening the plugin page after activation or from the Freemius opt-in showed "Sorry, you are not allowed to access this page". The page now opens and shows which plugin is missing, with a link to get it.

= 1.5.1 =
* Improved (Pro): the customer lifetime value in Metrics now comes from renewals – per billing cycle, the share of renewals due in the last 24 months that did not happen. Yearly plans are no longer estimated from monthly churn, which was close to zero in most months. Capped at 5 years and shown from 10 due renewals.
* New (Pro): "Subscriptions to check" at the bottom of the Metrics page lists running subscriptions whose billing cycle differs from their product (e.g. daily instead of yearly) or whose amount is far from the usual one. Each can be ignored.
* New: Italian and Spanish translations (it_IT, it_CH, es_ES, es_MX, es_AR, es_CO, es_CL).
* Improved: for the languages the plugin ships, its complete translations are used even when a wordpress.org language pack exists (language packs only contain the texts of the free version).
* The Metrics history is rebuilt once after the update.

= 1.5.0 =
* New (Pro): Win-back campaigns for unfinished sign-ups – customers whose first payment failed or whose first order was cancelled unpaid. Own e-mails with delays in hours or days; without a code the button opens the payment page of the original order. Separate filter under Contacts and a separate card on the dashboard.
* Fix (Pro): unfinished sign-ups no longer start the win-back sequence for cancelled subscriptions. Existing contacts of this kind are moved to the unfinished sign-ups after the update and their running sequences are stopped.
* Fix (Pro): Metrics no longer count subscriptions whose first payment never went through as new MRR and churn. The history is rebuilt once after the update.
* Fix: starting the trial import or the Metrics rebuild again now replaces batches still queued from an earlier run.

= 1.4.1 =
* The plugin is now called Subscription Toolkit (by NAVEST). Nothing changes in your settings, data or license.
* New: after the first saved subscription or converted trial, the plugin page asks once for a review on WordPress.org ("Maybe later" / "Don't ask again").

= 1.4.0 =
* New (Pro): Metrics – MRR over time, gained and lost MRR per month, churn rate and revenue churn, churn by reason (cancellation, failed payment, expired term), retention by start month, customer lifetime value and the renewals of the next 30 days. Filter by product or variation, CSV export. The history is built from existing subscriptions on activation.
* New: Metrics can be switched on or off under Settings → Modules like the other modules.
* Fix: the Win-back tab now follows its module switch. Pro modules are switched on once on the first start of the Pro version.

= 1.3.1 =
* Fix: the license key is entered in the Pro version; the free version now explains how to get it.
* Improved: Freemius screens in the plugin's colours.

= 1.3.0 =
* New: Retention module - cancellation survey popup in My Account with a free period or a discount per reason, campaigns by product or category, survey responses with filters and CSV export.
* New: Dashboard with trial conversion, saved cancellations, save rate and revenue, including a 12-month projection. Existing trial subscriptions can be imported under Settings → Tools.
* New: Multilingual support for WPML, Polylang, TranslatePress and Weglot, per-language campaign texts, Loco Translate support and French translations.
* New (Pro): Win-back e-mail sequence with personal codes, "welcome back" banner in My Account and contact overview.
* Licensing and the Pro upgrade are provided by the Freemius SDK (opt-in, see "External services").

= 1.2.0 =
* Initial public release under the name **NAVEST Toolkit for WooCommerce**.
* Trial Coupons module: registers a "Subscription Trial" coupon type. When applied, the initial cart total drops to 0.00 and the first recurring payment is pushed out by the configured trial length. Compatible with Smart Coupons for WooCommerce (Pro) by WebToffee — the type registers via the standard `woocommerce_coupon_discount_types` filter.
* Robust against gateway retry flows: the trial is re-applied via WCS's own trial getters (`woocommerce_subscriptions_product_trial_length` / `_period`) reading straight from post meta, so a cancelled or failed payment followed by a checkout retry keeps the trial intact.
* German translations bundled (de_DE, de_CH, de_AT). Rewrites the ungrammatical WooCommerce Subscriptions German phrase "mit ein 15-Tage kostenlose Testphase" into the correct dative form "mit 15 Tagen kostenloser Testphase".
* Optional debug logging via WooCommerce's logger (source `navest-trial-coupons`), enabled by `define( 'WCST_DEBUG', true );` in wp-config.php or automatically when `WP_DEBUG` is on.

== Upgrade Notice ==

= 1.5.2 =
Fixes the plugin page on sites without WooCommerce Subscriptions.

= 1.5.1 =
More realistic customer lifetime value for yearly plans and a check for subscriptions that distort MRR (Pro). Adds Italian and Spanish.

= 1.5.0 =
Win-back (Pro) now handles customers whose first payment failed separately, and Metrics leave them out of MRR and churn.

= 1.4.1 =
New name: Subscription Toolkit. Settings, data and license stay as they are.

= 1.4.0 =
Adds Metrics to the Pro version: MRR, churn and retention for your subscriptions.

= 1.3.1 =
Fixes the license key link in the free version.

= 1.3.0 =
Adds the Retention module (cancellation survey with offers), the dashboard and multilingual support. Win-back is available in the Pro version.
