=== StaySub ===
Contributors: nsthemes
Tags: woocommerce subscriptions, retention, cancellation, churn, subscription
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Reduce subscription cancellations with discount offers, pause options and surveys. v1.0 supports WooCommerce Subscriptions.

== Description ==

Every subscription business loses customers to cancellation — but not every cancellation has to be final. StaySub intercepts the cancel button in your customer's account and offers a real alternative before they leave: a discount or a pause.

No external SaaS connection required — your customer data stays on your server. No API key, no external account.

**Features (v1.0):**

* Intercept the cancellation flow with a customizable offer popup
* Offer a discount (fixed or percentage) or a renewal pause
* Collect cancellation reasons with a simple, configurable survey
* "Money Saved" dashboard: recurring revenue recovered thanks to accepted offers
* Full popup customization (accent color, logo)
* Lightweight: assets only load on the My Account subscription pages
* Works with any payment gateway supported by WooCommerce Subscriptions

**Roadmap:** support for YITH WooCommerce Subscription, Sublium and WP Swings Subscriptions for WooCommerce is planned once their hook names are confirmed against official developer documentation. v1.0 ships with WooCommerce Subscriptions only, by design, to validate the core mechanism first.

**StaySub Premium**, sold separately at [nsthemes.com](https://www.nsthemes.com/), adds offers segmented by cancellation reason, a plan-downgrade option, and email marketing integrations. This free version is fully functional on its own — Premium is an optional upgrade, not a requirement.

== Installation ==

1. Make sure WooCommerce and WooCommerce Subscriptions are active on your site.
2. Upload the `staysub` folder to `/wp-content/plugins/`, or install the plugin through the WordPress Plugins screen directly.
3. Activate the plugin through the **Plugins** screen in WordPress.
4. Go to **StaySub → Reasons** to configure the cancellation reasons customers can pick from.
5. Go to **StaySub → Offers** to configure at least one retention offer (discount or pause).
6. Go to **StaySub → Settings** to set your accent color and logo.
7. Go to **StaySub → Dashboard** to track performance once customers start interacting with the popup.

== Frequently Asked Questions ==

= Does StaySub require WooCommerce Subscriptions? =
Yes, in this version. Support for other subscription plugins (YITH, Sublium, WP Swings) is planned for a future release.

= Is my customer data sent to an external server? =
No. StaySub runs entirely on your own WordPress installation. No API key, no external account, no customer data leaves your site.

= Does StaySub work with any payment gateway? =
Yes. Since StaySub integrates with WooCommerce Subscriptions' own cancellation flow rather than replacing your billing system, it works with any payment gateway WooCommerce Subscriptions already supports.

= Can customers still cancel if they don't want the offer? =
Always. A clear "No thanks, cancel my subscription" option is always visible, and if anything goes wrong the customer is sent to the normal cancellation flow rather than being blocked.

= Is StaySub compatible with WooCommerce HPOS? =
Built against the standard WC_Subscription / WC_Order APIs, which are HPOS-compatible; verify against your specific WooCommerce version before relying on this in production.

= What happens to my settings if I uninstall the plugin? =
All settings and collected survey data are removed from your database upon uninstall, in line with WordPress.org guidelines. No residual data is kept.

= Is there a premium version? =
Yes. StaySub Premium is sold separately at [nsthemes.com](https://www.nsthemes.com/) and adds reason-based offer segmentation, a plan-downgrade option, and email marketing integrations. It is not required to use this plugin — everything listed above is included for free.

== Changelog ==

= 1.0.0 =
* Initial release: WooCommerce Subscriptions adapter, cancellation popup with survey and offers (discount/pause), "Money Saved" dashboard, admin settings.
