=== Subnotice — Subscription Compliance Checker (UK/US/EU) ===
Contributors: minisage
Tags: woocommerce, subscriptions, compliance, gdpr, auto-renewal
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.3.3
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Scan your policy text against UK, US, and EU subscription-renewal rules and get a 0-100 readiness score with fix notes.

== Description ==

Subnotice checks your store against three subscription-renewal compliance regimes, auto-detected from your WooCommerce store country (override any time):

* **UK** — the Digital Markets, Competition and Consumers Act 2024 (DMCCA) subscription contracts regime: clear pre-contract information, renewal reminder notices, easy cancellation, cooling-off rights. Enforcement expected from Spring 2027.
* **US** — state-level Automatic Renewal Laws (e.g. California, New York, Connecticut's annual-reminder rule). Not a federal FTC compliance check — there is no single federal auto-renewal statute currently in force.
* **EU** — the withdrawal-button requirement under Directive 2023/2673, in force EU-wide since 19 June 2026. This check is structural (declared yes/no/unsure), since a withdrawal button is a UI mechanism, not something policy text can confirm.

= What this plugin does (v1) =

* Auto-detects your jurisdiction from your WooCommerce store country, or lets you pick manually
* UK/US: auto-detects your WordPress Privacy Policy page and WooCommerce Terms & Conditions page (or accepts pasted text) and scores the wording
* EU: asks two structural questions (withdrawal button present? two-step confirmation?) since there's no policy text to parse
* Shows fix notes for anything pending

= What this plugin does not do =

* Does not read your live checkout or billing flow — policy text/declared setup only
* Not legal advice — informational scoring only
* Does not send reminder emails or store any subscription/customer data — this plugin is a one-time/on-demand policy-text scan only

== Privacy Policy ==

When you click "Check my compliance", the policy text you paste (or the auto-detected page content) is sent to Subnotice's hosted scoring API at subnotice.com over HTTPS, for scoring only. No data is stored by Subnotice — each scan is stateless.

Full privacy policy: https://www.subnotice.com/privacy

This plugin stores no personal data locally and creates no WordPress options.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/subnotice-woo`, or install through the WordPress plugins screen.
2. Activate the plugin.
3. Go to the "Subnotice" menu in wp-admin to run a check.

== Frequently Asked Questions ==

= Does this require WooCommerce? =

No — it works with just a WordPress Privacy Policy page. WooCommerce Terms & Conditions auto-detection is a bonus when WooCommerce is active.

= How does it pick my jurisdiction? =

It reads your WooCommerce store's base country (Settings → General) and maps it to UK, US, or EU automatically. You can override the detected jurisdiction any time from the checker page — useful if you sell into a jurisdiction different from where your store is registered.

= When does the DMCCA subscription regime take effect? =

Spring 2027 (subject to secondary legislation still pending UK government guidance). This only applies to the UK jurisdiction — US state Automatic Renewal Laws and the EU withdrawal-button requirement are already in force.

== Changelog ==

= 0.3.3 =
* Fixed WordPress.org manual review findings (review ID P0TDX336368HGN): removed the reminder-emails (Compliance Complete plan) code from this build entirely — it's not run/downloadable from WordPress.org, only through the separate Freemius-licensed distribution. Previously this code shipped here too, just permanently disabled; the reviewer flagged that as dormant/hard-disabled functionality.
* Renamed the Freemius bootstrap helper (`sw_fs()` → `subnotice_woo_fs()`, and related globals/hooks) to use a WordPress.org-compliant 4+ character prefix.

= 0.3.2 =
* Added WordPress core "Erase Personal Data" privacy tool support (`wp_privacy_personal_data_erasers`): erasing a customer now also removes their reminder records from the backend, not just via full-site uninstall.
* Refactored uninstall cleanup into a shared function (`includes/uninstall-cleanup.php`) so it can run from either `uninstall.php` (WP.org build) or a Freemius `after_uninstall` hook (Freemius-deployed build, which cannot ship an `uninstall.php` file).
* Not yet uploaded to WordPress.org — v0.3.1 review still pending as of this release.

= 0.3.1 =
* Fixed a WordPress.org review finding (Guideline 5, Trialware): removed the `sw_fs()->is_paying()` license check that gated the reminder-emails feature. That feature is disabled because it isn't finished yet (see FAQ), not because of payment — any future monetization enforcement will happen server-side, not as a local license check in this plugin.
* Fixed a WordPress.org review finding: replaced an inline `<script>` tag with `wp_enqueue_script()`/`wp_localize_script()` (`assets/js/jurisdiction-toggle.js`).
* Corrected `Contributors` to match the actual WordPress.org submitting account.

= 0.3.0 =
* Added the scaffolding for a paid "Compliance Complete" tier: automated pre-renewal reminder emails (WooCommerce Subscriptions) plus a downloadable audit trail. Dormant — not available for purchase yet, no charge, no data sent unless/until released.
* Added a "Reminder Emails" section to the admin page showing paid-tier status.

= 0.2.1 =
* Fixed text domain mismatch across all translation strings (was "subnotice-woo", now matches the WordPress.org-assigned slug "subnotice-subscription-compliance-checker-ukuseu").
* Fixed "Tested up to" header (was 9.4, a WordPress version that doesn't exist — corrected to the actual current WordPress core version).
* Shortened the readme short description to fit the 150-character limit.
* Removed the "Domain Path" plugin header (pointed to a non-existent languages/ folder — no translations exist yet).

= 0.2.0 =
* Added US (state Automatic Renewal Law) and EU (withdrawal-button, Directive 2023/2673) jurisdictions alongside UK DMCCA — auto-detected from WooCommerce store country, with manual override.
* EU jurisdiction uses structural declared-flag questions instead of a policy-text scan.

= 0.1.0 =
* Initial release: policy-text audit against DMCCA checks (audit-parity with the Subnotice Shopify app).
