=== CMSPS Revenue Pulse Advisor ===
Contributors: codingmall
Tags: woocommerce, analytics, ai, insights, ecommerce
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Run WooCommerce revenue analysis from wp-admin and review results.

== Description ==

This plugin adds a WooCommerce admin workflow for:
* Running revenue analysis for preset or custom date ranges.
* Viewing saved analysis results in wp-admin.
* Buying credits.
* Reviewing credit purchase history.

== External services ==

This plugin connects to external services for activation, credit balance lookup, revenue analysis generation, and credit purchases.

Service website:
* https://codingmall.com
* https://fastspring.com

When requests are sent:
* During activation or automatic reconnection to provision site credentials
* When the store owner runs a revenue analysis
* When plugin admin pages request credit balance or credit ledger data
* When the `Buy Credits` page loads to show available credit packages
* When the site owner starts a credit purchase through FastSpring checkout

Data sent:
* Store/site identifiers needed for authentication and activation
* Aggregated WooCommerce metrics for the selected analysis window, such as revenue, orders, AOV, refunds, discounts, and product/category summaries
* The current `site_id` in checkout links so purchased credits can be linked to the correct site

Service policies:
* Terms of Use: https://codingmall.com/terms-of-use
* Privacy Policy: https://codingmall.com/privacy-policy
* FastSpring Privacy Policy: https://fastspring.com/privacy/

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/cmsps-revenue-pulse-advisor`, or install through the WordPress plugins screen.
2. Activate the plugin through the WordPress plugins screen.
3. Open `Revenue Pulse Advisor > Settings`.
4. Wait for the plugin to generate site credentials automatically on a live public domain.
5. Run your first analysis from `Run Revenue Analysis`.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =
Yes. WooCommerce must be installed and active.

= How are credits purchased? =
Use the `Buy Credits` screen inside the plugin.

= Do I need to enter API credentials manually? =
No. The plugin attempts to generate site credentials automatically after activation on a live public domain.

= Does the plugin store payment details? =
No. Payments are handled by FastSpring checkout links.

== Screenshots ==

1. Plugin settings with connection status, credits overview, and quick actions.
2. Run Revenue Analysis page with preset and custom date range options.
3. Results history with saved analysis runs and status indicators.
4. Analysis detail view with generated insights and source snapshot.

== Changelog ==

= 1.0.3 =
* Fixed automatic site activation for WordPress installations hosted in a subdirectory path.

= 1.0.2 =
* Improved connection and activation messaging in wp-admin.

= 1.0.1 =
* Improved automatic setup when site credentials are missing.
* Improved the disconnected-site admin flow.

= 1.0.0 =
* Initial stable release.
* Added the Buy Credits screen.
* Added credits purchase history.

== Upgrade Notice ==

= 1.0.3 =
Subdirectory WordPress installs now activate correctly.

= 1.0.0 =
Initial stable release.
