=== WITHMIA ChatWeb ===
Contributors: appwithmia
Tags: chatbot, live chat, ai, webchat, customer support
Requires at least: 5.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.4
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Add an AI-powered live chat assistant to your WordPress site. It answers questions, captures leads and sells for you — 24/7.

== Description ==

**WITHMIA ChatWeb** installs a smart chat widget on your WordPress site, powered by artificial intelligence. Your virtual assistant answers customer questions, captures contact details and generates sales — automatically, 24 hours a day.

### What does this plugin do?

💬 **AI live chat**
A floating button on your site opens a chat where your AI assistant answers questions about your products, services, opening hours and more.

🧠 **Trained with your information**
From the WITHMIA dashboard you train your assistant with your business information. It answers as if it were part of your team.

📱 **Omnichannel**
The same assistant that answers on your website can also answer on WhatsApp, Instagram, Messenger and email. All conversations stay unified in one inbox.

🎯 **Lead capture**
Configure pre-chat forms to collect name, email and phone number before the conversation starts.

🎨 **Customizable**
Choose the language, dark theme and button text, and exclude specific pages where you don't want the chat to appear. The color and position come from your WITHMIA dashboard, so the bubble always matches the chat window.

📊 **Metrics and follow-up**
Review every conversation, response times and satisfaction from your WITHMIA dashboard.

### Features

* Responsive floating chat widget
* AI assistant trained with your business information
* Color and position synced live from your WITHMIA dashboard
* Language and button text customization
* Automatic dark theme
* Per-page exclusion rules
* Mobile visibility control
* Simple admin panel
* Cache and CDN friendly
* Asynchronous loading with no performance impact
* Chat window in 6 languages (ES, EN, PT, FR, DE, JA)
* Admin panel translated into Spanish, Portuguese, French, German and Japanese

### Requirements

* A [WITHMIA](https://withmia.com) account (every plan includes the web chat, and new accounts start with a 14-day free trial)
* WordPress 5.0+
* PHP 7.4+

== External services ==

This plugin connects your site to the WITHMIA platform, a third-party service operated by MIA SpA. It is required for the chat widget to work:

* **What it connects to:** the chat server URL you configure in the plugin settings (your WITHMIA chat server, e.g. `https://chat.withmia.com`). The plugin loads the chat widget script (Chatwoot SDK) from that server, reads your widget configuration, and sends/receives the chat messages between your site visitors and your AI assistant.
* **What data is sent:** the messages your visitors type into the chat, and any contact details they voluntarily provide in the pre-chat form (such as name, email and phone number). This data is sent to your own WITHMIA account so you can read and answer the conversations.
* **When:** only on pages where the widget is displayed, after the page loads.

Service provider: WITHMIA — [Terms of Service](https://withmia.com/terminos) · [Privacy Policy](https://withmia.com/privacidad)

== Installation ==

### Automatic installation

1. Go to **Plugins → Add New** in your WordPress dashboard
2. Search for "WITHMIA ChatWeb"
3. Click **Install** and then **Activate**
4. You will be redirected to the settings page

### Manual installation

1. Download the plugin ZIP file
2. Go to **Plugins → Add New → Upload Plugin**
3. Select the ZIP file and click **Install Now**
4. Activate the plugin

### Setup

1. If you don't have an account yet, click **Create your WITHMIA account**
2. In [app.withmia.com](https://app.withmia.com), go to **Integrations → Web Chat**
3. Connect your web chat channel
4. Copy the **Website Token** and the **Server URL**
5. Paste them into **WITHMIA Chat** in your WordPress dashboard
6. Choose the language and button text (the color and position are set in the WITHMIA dashboard)
7. Click **Save changes**
8. Your AI assistant is now live!

== Frequently Asked Questions ==

= Do I need a WITHMIA account? =

Yes. This plugin connects your WordPress site to the WITHMIA platform, where you configure and train your AI assistant. You can start at [withmia.com](https://withmia.com) — new accounts include a 14-day free trial, no credit card required.

= Does the plugin slow down my site? =

No. The widget loads asynchronously (async/defer) and does not block your page rendering. It is compatible with caching plugins such as WP Rocket, W3 Total Cache and LiteSpeed Cache.

= Can I customize how the chat looks? =

Yes. In the plugin you choose the language, the button text and the dark theme. The color and position (left/right) are set in the WITHMIA dashboard, under Integrations → Web Chat, and your site picks them up on its own. From the dashboard you can also customize the agent name, avatar, suggested questions and the pre-chat form.

= Does it work with WooCommerce? =

Yes. The widget works on any WordPress page, including WooCommerce stores. If you also want your AI to sell your products, install the **WITHMIA for WooCommerce** plugin as well.

= Can I exclude the chat from certain pages? =

Yes. In the settings you can list paths to exclude, with wildcard support. For example: `/checkout`, `/my-account/*`.

= Does it work on mobile? =

Yes, the widget is fully responsive. You can disable it on mobile devices from the settings if you prefer.

= Does the chat also work on WhatsApp? =

Yes. WITHMIA is an omnichannel platform — the same AI assistant that answers on your website can also answer on WhatsApp, Instagram, Messenger and email.

= How do I train my assistant? =

From the WITHMIA dashboard (app.withmia.com) you can upload documents, website URLs, frequently asked questions and more. The AI learns from all of that material.

== Screenshots ==

1. Settings page — signup flow
2. Connected widget — customization panel
3. Chat view on the frontend
4. Appearance and behavior settings

== Changelog ==

= 1.1.4 =
* The bubble now uses the color you choose in the WITHMIA dashboard, the same one as the chat window. The plugin used to paint it with its own color, so the two could differ
* The color and position fields were removed from the plugin settings: the dashboard already controlled them and overrode what was set here
* Translations now load on the init hook

= 1.1.3 =
* The admin panel is now fully translatable and ships with Spanish, Portuguese, French, German and Japanese
* Japanese added to the chat window languages
* The WITHMIA mark replaces the generic emoji icons in the admin menu and settings page
* Screenshots added to the plugin directory listing

= 1.1.2 =
* All JS/CSS output now uses the WordPress enqueue APIs (wp_add_inline_script / wp_add_inline_style)
* The widget bubble logo is now bundled with the plugin instead of loaded from a remote server
* Fixed: editing the connection fields while the disconnect controls were present could silently discard the edit
* readme rewritten in English; added the External services disclosure

= 1.1.1 =
* The widget position now syncs live from your WITHMIA dashboard

= 1.0.0 =
* Initial release
* Floating chat widget powered by the Chatwoot SDK
* Admin panel with subscription-first flow
* Customization: color, position, language, dark theme
* Page exclusion rules and mobile visibility control
* Asynchronous loading with no performance impact
* Automatic redirect to settings after activation

== Upgrade Notice ==

= 1.1.4 =
The bubble now matches your chat window: color and position are set in the WITHMIA dashboard.

= 1.1.3 =
The admin panel now speaks your language: Spanish, Portuguese, French, German and Japanese included.

= 1.1.2 =
Compliance and bugfix release: WordPress enqueue APIs, bundled logo asset and a connection-form fix.
