=== Invizo Subscriptions Lite ===
Contributors: invizo
Donate link: https://invizo.com/
Tags: stripe subscriptions, recurring payments, woocommerce, membership, subscription billing
Requires at least: 6.3
Tested up to: 6.9
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Create Stripe-powered recurring subscriptions with plan pages, checkout shortcodes, customer account pages, and optional WooCommerce subscription products.

== Description ==

Invizo Subscriptions Lite helps you sell recurring access, services, memberships, or subscription products from your WordPress site using Stripe.

You can use it in two ways:

* **Standalone subscriptions**: create plans in WordPress, show them with shortcodes, and send customers through a focused Stripe checkout flow.
* **WooCommerce subscriptions**: add an Invizo Subscription product type and let WooCommerce handle the shopping flow while Invizo stores subscription details.

The plugin is built for site owners who want subscription billing without turning every page into a full store. It gives you plan management, Stripe checkout, subscription records, webhook sync, and customer-facing account pages in one lightweight workflow.

= Highlights =

* Stripe Payment Element checkout for modern card payments and SCA-ready flows.
* Plan management inside WordPress, including price, billing interval, media, features, and trial days.
* Shortcodes for plan lists, checkout, account pages, login/register pages, and subscriber self-service.
* Customer portal pages where subscribers can review status, billing details, next payment dates, and saved payment methods.
* React-powered admin screens for plans, subscriptions, setup, and settings.
* Stripe webhooks and background sync to keep local subscription records aligned.
* Privacy-policy consent support on checkout when you configure a policy page.
* Optional WooCommerce product type for subscription products.

= Shortcodes =

Use these shortcodes on normal WordPress pages:

* `[invizo_store]` or `[invizo_plans]` - show available plans.
* `[invizo_checkout]` - show the standalone checkout.
* `[invizo_checkout plan_id="123"]` - lock checkout to one plan.
* `[invizo_account]` - show the customer account area.
* `[invizo_subscriptions]` - show subscriber subscription details.
* `[invizo_auth]` - show login/register links and account actions.

You can also link directly to checkout with a plan query string, for example `/checkout/?plan=123`.

= Who is this for? =

Invizo Subscriptions Lite is useful for:

* Creators selling paid access on a monthly or yearly schedule.
* Agencies and service businesses billing clients on a recurring plan.
* Coaches, educators, and membership sites that need simple subscription checkout.
* WooCommerce stores that want a dedicated subscription product type connected to Stripe.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install the plugin zip from **Plugins > Add New**.
2. Activate **Invizo Subscriptions Lite** from the **Plugins** screen.
3. Make sure WooCommerce is installed and active. This release lists WooCommerce as a required plugin.
4. Open **Subscriptions > Settings** and add your Stripe keys.
5. Choose your engine mode: **Standalone** or **WooCommerce**.
6. Create at least one plan or subscription product.
7. Add the relevant shortcodes to your checkout, store, and account pages.

= Manual or Git install =

If you install from source, run Composer before using the plugin:

`composer install`

The Composer script runs Strauss and builds the prefixed runtime dependency bundle in `invizo-vendor/`. Stripe classes load from `InvizoSubscriptionsLiteVendor\Stripe\`, and Composer runtime classes load from `InvizoSubscriptionsLiteVendor\Composer\`.

For the React admin app, the distributed plugin already includes built assets and source files. To rebuild them:

`cd react-ui && npm install && npm run build`

The build writes the admin browser files to `assets/js/app.js` and `assets/css/app.css`.

== Frequently Asked Questions ==

= Do I need Stripe? =

Yes. Invizo Subscriptions Lite uses Stripe for subscription creation, renewals, payment methods, and webhook updates.

= Do I need WooCommerce? =

Yes for this release. WooCommerce is listed as a required plugin. You can still use standalone subscription pages while WooCommerce is active.

= Can I sell subscriptions without a shop catalog? =

Yes. Use standalone mode, create plans, and place `[invizo_store]` and `[invizo_checkout]` on your pages.

= Does it support free trials? =

Yes. Standalone plans can include trial days, and WooCommerce subscription products include related subscription settings.

= Does it support Strong Customer Authentication? =

Yes. Checkout uses Stripe's Payment Element and intent-based payment flow, which supports authentication when Stripe requires it.

= Where are subscription records stored? =

Plans and subscriptions are stored in WordPress as custom post types and linked to Stripe IDs with post meta.

= Can customers manage their subscriptions? =

Customers can view subscription status, billing context, next payment details, and payment methods from the frontend account pages. Where available, Stripe-hosted billing portal links may also be used.

= How do I send someone to checkout for one plan? =

Use `[invizo_checkout plan_id="123"]` or link to a checkout page with `?plan=123`, replacing `123` with the plan post ID.

= How should I report a security issue? =

Please report security issues privately to the plugin author or through the contact listed on the plugin's official page. Please do not publish sensitive security details publicly.

== External services ==

This plugin connects to Stripe services outside your site.

* **Stripe.js** (`js.stripe.com`) is loaded on checkout pages so Stripe can render secure payment fields.
* **Stripe API** is used to create and update customers, create subscriptions, manage payment methods, create webhook endpoints when requested by an admin, and sync subscription/payment status.
* **Stripe-hosted pages** may be opened for billing portal actions where configured.

= What data is sent to Stripe? =

When a customer checks out or manages billing, the plugin may send the customer's name, email address, selected plan, billing country/city/postal code, Stripe customer IDs, Stripe subscription IDs, payment method IDs, payment intent IDs, and related billing metadata needed to complete and maintain the subscription.

Payment card details are entered into Stripe-hosted payment fields and are handled by Stripe.

* Stripe Services Agreement: https://stripe.com/ssa
* Stripe Privacy Policy: https://stripe.com/privacy

== Build and source files ==

The plugin includes generated browser assets for performance and the human-readable source files needed to review and rebuild them.

= Admin app assets =

* Generated files: `assets/js/app.js` and `assets/css/app.css`.
* Source directory: `react-ui/src/`.
* Important source files: `react-ui/src/main.jsx`, `react-ui/src/App.jsx`, `react-ui/src/components/`, `react-ui/src/hooks/`, `react-ui/src/App.css`, and `react-ui/src/index.css`.
* Build files included for review: `react-ui/package.json`, `react-ui/package-lock.json`, `react-ui/vite.config.js`, and `react-ui/index.html`.
* Rebuild command: `cd react-ui && npm install && npm run build`.

= Other frontend assets =

These files are shipped as human-readable source:

* `assets/js/checkout.js`
* `assets/css/checkout.css`
* `css/account-portal.css`
* `css/store.css`

= PHP dependencies =

Stripe's PHP SDK is installed with Composer and prefixed with Strauss into `InvizoSubscriptionsLiteVendor\Stripe\` under `invizo-vendor/`.

Stripe's own SDK contains a cURL-based HTTP client. Those cURL calls are part of the third-party Stripe library, not plugin-specific HTTP code. Plugin-specific HTTP requests should use WordPress APIs.

The root `vendor/` and `node_modules/` folders are not included in the release package. The reviewable React source is included, but `react-ui/node_modules/` is not.

== Screenshots ==

1. Admin dashboard with subscription overview and quick stats.
2. Subscriptions list with status, subscriber, plan, amount, and next payment.
3. Plan editor for pricing, billing interval, media, and features.
4. Settings screen for Stripe keys, engine mode, pages, and setup.
5. Standalone plan store created with shortcodes.
6. Standalone checkout with Stripe Payment Element.
7. Customer account and subscription portal pages.
8. WooCommerce subscription product settings.

== Changelog ==

= 1.0.7 =

* Updated the bundled Stripe PHP SDK to the 20.x line.
* Switched the prefixed dependency build to Strauss.
* Added clearer build/source documentation for generated admin assets.
* Hardened generated Composer autoload files for WordPress.org review.
* Improved escaping and asset loading around admin and frontend templates.

= 1.0.6 =

* Namespaced bundled Stripe SDK classes to reduce plugin conflicts.
* Removed plugin-managed user creation/login flows.
* Replaced inline scripts/styles with WordPress enqueue APIs.
* Documented bundled asset sources and Stripe external-service usage.
* Removed global cache defines.
* Improved sanitization and escaping.

= 1.0.5 =

* Added a checkout loading skeleton for the Stripe Payment Element.

= 1.0.4 =

* Fixed standalone plan updates in the admin app.

= 1.0.3 =

* Security, compatibility, and review fixes.

= 1.0.2 =

* Maintenance and checkout/admin improvements.

= 1.0.0 =

* Initial release with Stripe subscriptions, standalone shortcodes, WooCommerce subscription product type, React admin, REST API, webhooks, and member-facing shortcodes.

== Upgrade Notice ==

= 1.0.7 =

Recommended update for Stripe SDK updates, safer dependency prefixing, clearer source documentation, and WordPress.org review hardening.

= 1.0.6 =

Recommended update for WordPress.org review, compatibility, and security fixes.
