=== Peloran for WooCommerce ===
Contributors: peloran
Tags: woocommerce, analytics, marketing, crm, personalization
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.1.11
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect WooCommerce to Peloran SaaS. Install the plugin and connect — no manual API keys or webhooks.

== Description ==

Connect your WordPress or WooCommerce store to Peloran — an enterprise-grade Customer Intelligence platform built for merchants who want to understand customer behavior, increase conversions, and grow revenue with AI.

Unlike traditional analytics tools that simply report what happened, Peloran explains why visitors hesitate, abandon their carts, wait for discounts, or become loyal customers.

Using machine learning and real-time behavioral analysis, Peloran continuously transforms anonymous visitor interactions into actionable customer intelligence that powers every marketing decision.

Behavioral Intelligence includes:

• Hesitation Score™
• Discount Sensitivity Analysis
• Product Success Score
• Churn Prediction
• Customer Lifetime Value (CLV)
• Purchase Intent Detection
• Customer Value Orientation
• Returning Visitor Intelligence
• Incremental Revenue Measurement

Turn behavioral insights into automated actions with:

• AI-powered Marketing Journeys
• Personalized Popups & Offers
• Smart Customer Segmentation
• Email, WhatsApp & Web Push Campaigns
• AI Product Recommendations
• Homepage Personalization
• Predictive Audience Targeting
• Conversion Optimization

Peloran also helps merchants understand what products actually drive growth.

Product Intelligence includes:

• Product Success Score
• Inventory & Stock Calendar
• Demand Trends
• Product Performance Analytics
• Customer Interest Evolution

Unlike most marketing plugins that stop at dashboards and conversion reports, Peloran combines visitor tracking, predictive analytics, machine learning, behavioral scoring, customer intelligence, and marketing automation into a single enterprise platform.

Whether your goal is reducing cart abandonment, increasing Average Order Value, improving merchandising, or creating highly personalized customer journeys, Peloran provides the intelligence layer behind every customer interaction.

Enterprise capabilities include:

• Machine Learning Analytics
• AI Marketing Journeys
• Enterprise Visitor Tracking
• Predictive Customer Scoring
• Behavioral Segmentation
• Customer Intelligence Engine
• Incremental Revenue Analytics
• Product Intelligence
• Inventory Intelligence
• Stock Calendar
• Real-time Behavioral Analytics
• WooCommerce Integration

Turn customer behavior into measurable revenue!

This plugin is a connector to the Peloran service (Software as a Service). After you connect, your store communicates with https://app.peloran.com for order/catalog sync webhooks and optional storefront scripts used for analytics and journeys.

= Two ways to get started =

**A) Plugin first (you found us on WordPress.org)**

1. Install and activate **Peloran for WooCommerce** from this page (Plugins → Add New, or the Download button).
2. Open WooCommerce → Peloran and click **Connect and open Peloran** — the plugin links your store (REST keys) and opens Peloran signup / login in one step.
3. Create your account (or sign in). Onboarding continues with the store already linked — no return trip to WordPress.
4. Finish imports, tracking checks, and activation in Peloran.

**B) Peloran first (you registered at app.peloran.com before installing the plugin)**

1. Sign in at https://app.peloran.com/login and start WooCommerce onboarding with your store URL.
2. Install and activate this plugin from WordPress.org before continuing:
   https://wordpress.org/plugins/peloran-for-woocommerce/
3. In Peloran, click **Connect store** — WordPress opens the Peloran settings page and links automatically (no token paste for the normal flow).
4. Onboarding steps stay locked until the plugin has linked the store. Then finish imports and activation in Peloran.

= What connects where =

* **Admin Connect** posts your shop URL and freshly minted REST keys to Peloran’s connect API (HTTPS).
* **Storefront** loads the Peloran `sa-init` script from an allowlisted host (`app.peloran.com`) **only while connected**.
* **Disconnect** (or uninstall) stops loading the storefront script and removes local connection options.

== Installation ==

= Path A — Install the plugin from WordPress.org, then use Peloran =

1. Install **Peloran for WooCommerce** from Plugins → Add New (search “Peloran for WooCommerce”), or download the zip from this plugin page.
2. Activate the plugin (WooCommerce must already be active).
3. Go to WooCommerce → Peloran → **Connect and open Peloran**.
4. Create / sign in to Peloran; the store is already linked.
5. Finish onboarding in the Peloran panel.

= Path B — Register in Peloran first, then install the plugin =

1. Create / sign in at https://app.peloran.com/login and choose WooCommerce + your store URL.
2. **Required before onboarding continues:** install and activate this plugin from
   https://wordpress.org/plugins/peloran-for-woocommerce/
   (WordPress Admin → Plugins → Add New → search “Peloran for WooCommerce”).
3. In Peloran onboarding, click **Connect store** so WordPress opens this plugin’s settings and links the store.
4. Return to Peloran; setup steps unlock only after the store is linked. Complete the remaining onboarding there.

= After either path =

* The plugin creates WooCommerce REST API keys labeled “Peloran”.
* Peloran registers webhooks and loads storefront tracking only after a successful connect.
* You can Disconnect anytime under WooCommerce → Peloran.

== Screenshots ==

1. Marketing Journeys — visual builder for live offers, waits, and on-site discount notifications.
2. 3D Behavior Space — session path through time, engagement, and churn / purchase probability.
3. Smart Sorting — journey action that personalizes product order by value orientation.
4. Customer profile — demographics, hesitation, value orientation, and discount intelligence.
5. Personalized discounts & recommendations — AI offers, product ranking, and measurable lift.

== Frequently Asked Questions ==

= Do I need to create API keys manually? =

No. Connecting from Peloran (Connect store) or completing link from WooCommerce → Peloran creates read/write WooCommerce REST API keys labeled “Peloran” and sends them securely to Peloran.

= Do I need to paste a connect token? =

No for the normal flow. Peloran opens WordPress with a one-time secure link. An advanced “paste token” field remains for emergencies.

= Does the plugin track visitors before I connect? =

No. Storefront scripts are enqueued only after a successful Connect.

= Can I change the SaaS URL? =

No. The plugin always connects to https://app.peloran.com. Arbitrary origins are rejected.

= I started in Peloran but onboarding will not continue =

Install and activate the plugin from WordPress.org, then use **Connect and open Peloran** in WooCommerce → Peloran (or **Connect store** if you started in the Peloran app). Wizard steps stay locked until that link succeeds.

== Privacy ==

Connecting this plugin shares store technical data required for the Peloran service (shop URL, REST credentials minted for Peloran, webhook payloads for catalog/orders as configured on Peloran’s servers, and storefront session analytics when tracking is active).

Peloran’s privacy policy: https://www.peloran.com/privacy
Terms of use: https://www.peloran.com/terms

You can Disconnect in WooCommerce → Peloran to stop storefront script loading, or uninstall the plugin to remove local options. Revoking remote access permanently should also be done in the Peloran panel when available.

== Changelog ==

= 0.1.11 =
* Connect and open Peloran: one click links the store (API keys) and opens signup/login — no bounce back to WordPress.

= 0.1.10 =
* Open Peloran opens /login with platform=woocommerce&source=woocommerce_plugin (skips platform picker).

= 0.1.9 =
* Connect via Peloran deep-link (no primary token paste). Status + Open / Continue in Peloran.
* Advanced manual token paste kept for emergencies.
* WordPress.org listing: five app screenshots; readme documents plugin-first and Peloran-first install paths.

= 0.1.8 =
* Continue opens Peloran panel (?shop=) instead of /login (avoids Shopify install screen).
* Plugins list: Open Peloran link to WooCommerce → Peloran settings.

= 0.1.7 =
* After connect, show Continue in Peloran button (opens /login?shop=… in a new tab).

= 0.1.6 =
* Hardcode SaaS origin to https://app.peloran.com (remove merchant-facing SaaS URL field).

= 0.1.5 =
* Distinct Plugin URI (https://www.peloran.com/woocommerce) vs Author URI.

= 0.1.4 =
* Plugin Check: use WP %i table placeholder for API key cleanup (no SQL interpolate).

= 0.1.3 =
* Plugin Check (PCP) fixes: slug `peloran-for-woocommerce`, Tested up to 7.0.
* Flash notices via transient (no query-string nonce warnings).
* Escaped API-keys table name; script version param; prefixed uninstall vars.

= 0.1.2 =
* WordPress.org / Plugin Check preparation: headers, readme privacy, HPOS declare.
* Enqueue sa-init via wp_enqueue_script; allowlisted SaaS hosts only.
* Disconnect + uninstall cleanup; translated error strings.

= 0.1.1 =
* Connect token handshake hardening.

= 0.1.0 =
* Initial plugin + SaaS handshake.

== Upgrade Notice ==

= 0.1.11 =
Connect and open Peloran links your store in one click from WordPress Admin, then opens Peloran — no return trip for linking.

= 0.1.9 =
Prefer Connect store from Peloran onboarding (opens WordPress automatically). Token paste is advanced-only. Updated screenshots and dual install paths in the listing.

= 0.1.8 =
Continue now opens the Peloran app for your shop; Plugins list includes Open Peloran.

= 0.1.7 =
Adds a clear Continue in Peloran button after the store is connected.

= 0.1.6 =
SaaS host is fixed to app.peloran.com; reconnect if you had a custom origin.

= 0.1.5 =
Plugin URI / Author URI now distinct — required for WordPress.org submission.

= 0.1.4 =
Plugin Check cleanup — use this build for WordPress.org submission.

= 0.1.3 =
Required for WordPress.org Plugin Check (slug rename). Reinstall from the new zip if upgrading from 0.1.2.
