=== Masiou Chat ===
Contributors: masiou
Tags: chat, ai chat, chatbot, sales, lead capture
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

Masiou adds a smart AI chat helper to your shop that answers your shoppers and helps turn more of them into buyers.

== Description ==

Masiou is an AI-powered chat widget that turns casual visitors into customers. It knows your product catalog, answers in 40+ languages automatically, and captures leads when visitors don't convert.

= What you get =

* **Product-aware AI answers** — visitors get real product cards with photos, prices, and add-to-cart buttons.
* **40+ languages** with automatic detection. Greek customer types in Greek, the bot answers in Greek. German in German. Same widget.
* **Email transcript & lead capture** — when a visitor leaves an email or phone in chat, you get an instant alert.
* **Monthly performance reports** delivered to your inbox.
* **Zero coding** — install plugin, paste your Client ID, save. Widget is live.
* **Fast** — the script loads asynchronously with `defer` and uses `preconnect` for the bundle host. No CLS impact.

= How it works =

1. Sign up at [masiou.com](https://masiou.com/register/) — there is a free 7-day trial.
2. Install this plugin on your WordPress site.
3. In **Settings → Masiou Chat**, paste your **Client ID** (visible on your dashboard at masiou.com/my-account/dashboard/).
4. Save — the chat widget appears in the bottom-right of every page.

= Compatible with =

* WooCommerce, Easy Digital Downloads, and other store plugins
* WP Rocket, W3 Total Cache, and other caching plugins
* Any theme — the widget is rendered in a top-layer overlay

= External services =

This plugin loads a JavaScript bundle and connects to **chat.masiou.com**, hosted by Masiou (BearsMedia Digital, Athens, Greece) on Hetzner servers within the EU.

* **What is sent**: the visitor's chat messages, your Client ID, and standard browser metadata (page URL, language).
* **What is stored**: conversations and captured leads are stored in EU servers (Hetzner, Germany/Finland) for 30 days.
* **GDPR**: a DPA is available on request. Full privacy details at [masiou.com/privacy](https://masiou.com/privacy/).
* **Terms of Service**: [masiou.com/terms](https://masiou.com/terms/).

The widget bundle URL: `https://chat.masiou.com/widget.bundle.js`

= Pricing =

Plans start at €59/month. Every new account gets a 7-day free trial — €0 today, first charge on day 8, cancel anytime. Full pricing at [masiou.com/pricing](https://masiou.com/pricing/).

== Installation ==

1. From WP Admin → **Plugins → Add New**, search for "Masiou" and click **Install Now**, then **Activate**.
   (Or: upload the `masiou-chat` folder to `/wp-content/plugins/` via FTP and activate from the Plugins screen.)
2. Go to **Settings → Masiou Chat**.
3. Paste your **Client ID** (find it on your dashboard at https://masiou.com/my-account/dashboard/).
4. Click **Save Changes**.
5. Visit any front-end page — the chat bubble is now in the bottom-right corner.

== Frequently Asked Questions ==

= Do I need a Masiou account? =

Yes. Sign up at https://masiou.com/register/ to get your Client ID. New accounts include a 7-day free trial — €0 today, first charge on day 8.

= Will it slow down my site? =

No. The widget bundle loads with `defer` (after HTML parsing) and uses `preconnect` to warm up the connection. Lighthouse and PageSpeed Insights report no impact on LCP or CLS.

= Does it work with WooCommerce? =

Yes. The widget reads your product catalog through a separate feed (configured in your Masiou dashboard), so the AI can recommend actual products with photos and prices.

= How do I disable the widget on specific pages? =

Use the `masiou_chat_should_inject` filter in your theme's `functions.php`:

`add_filter( 'masiou_chat_should_inject', function( $inject ) {`
`    if ( is_page( 'checkout' ) ) return false;`
`    return $inject;`
`} );`

= Is visitor data GDPR-compliant? =

Yes. Data is stored on Hetzner EU servers. We retain conversations for 30 days. A DPA is available on request. Full details: https://masiou.com/privacy/

= I see no widget after activating. What now? =

1. Confirm your Client ID is correct (copy/paste from your dashboard, no extra spaces).
2. Make sure the **Enable widget** checkbox is ticked.
3. If you use a heavy caching plugin, purge the cache.
4. Open your site in an incognito window and check the bottom-right corner.

= Can I customize colors / brand the widget? =

Yes, but those settings live in your Masiou dashboard — not in this plugin. Log in to https://masiou.com/my-account/dashboard/ and open the **Appearance** sub-tab.

= Where do I configure FAQ, contact info, product feed, sitemaps, opening hours, welcome message, notifications? =

Everything beyond the Client ID lives in your Masiou dashboard, not in this plugin. Log in to https://masiou.com/my-account/dashboard/ to set up:

* Business info & contact details (email, phone, address, opening hours)
* FAQ entries — custom questions and answers the AI should know
* Product feed (XML / catalog URL) for product-aware answers
* Sitemap / pages so the AI can link visitors to the right pages
* Custom welcome message and auto-open behavior
* Widget appearance (theme color, position) and brand
* Email notifications — daily reports, instant lead alerts, AI Insights
* Size guide (for fashion stores) and other vertical-specific data

== Screenshots ==

1. The chat widget in the bottom-right of an e-shop — a visitor asks a question, the AI answers with real product cards.
2. The Masiou dashboard showing live conversations, captured leads, and AI Insights.
3. The plugin's Settings page — paste your Client ID, save, you're done.

== Changelog ==

= 1.0.0 =
* Initial public release.
* Settings page (Settings → Masiou Chat) with Client ID, enable/disable toggle, lazy-load option.
* Server-side preconnect for the widget host (zero CLS, faster LCP).
* Widget bundle enqueued via wp_enqueue_script with deferred loading.
* `masiou_chat_should_inject` filter for per-page disable.
* `masiou_chat_config` filter for advanced developers to customize the widget config.
* Multisite-aware uninstall — clears options on every site of the network.

== Upgrade Notice ==

= 1.0.0 =
First public release.
