=== WeblioHub – AI Chatbot & Live Chat ===
Contributors: webliohub
Tags: chatbot, ai chatbot, live chat, whatsapp, cookie consent
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 0.9.17
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI chatbot, live chat inbox, WhatsApp and Telegram, contact form, newsletter and cookie consent for WordPress, managed from one WeblioHub workspace.

== Description ==

WeblioHub connects your WordPress site to a WeblioHub workspace, where visitor conversations from your website, WhatsApp and Telegram arrive in one inbox and an AI assistant trained on your content can answer them.

From the WordPress admin you can:

* Configure the AI chatbot: appearance, behavior, pre-chat form, Home / Messages / Help navigation, FAQs, quick messages, AI training and meeting booking (calendar).
* Connect your Telegram bot and your WhatsApp Business number (through your own Meta app) and show their buttons next to the chatbot.
* Configure a contact form, newsletter sign-up and a cookie consent banner.
* Follow messages, tasks, subscribers, cookie consent reports and your package.
* With WooCommerce, let the AI answer product questions with live product cards from your store.

WeblioHub is a hosted service (software as a service). This plugin is the connector: the chatbot, AI replies, inbox and reports run on WeblioHub. A free plan is available; some features (AI training, navigation, quick messages, cookie policy, custom CSS, product search) need a paid package with the IO feature. See https://www.webliohub.com/pricing.

Widgets are not injected automatically. After connecting, copy each widget's embed code from WeblioHub → Settings → Setup and place it on your site, for example with a code snippets plugin so it survives theme changes. The contact form can also be placed with the shortcode `[webliohub_contact_form]`.

== Installation ==

1. Download `webliohub.zip` from https://www.webliohub.com/docs/getting-started/wordpress. In the WordPress admin go to Plugins → Add New Plugin → Upload Plugin, choose the ZIP, click Install Now and then Activate.
2. Open WeblioHub in the WordPress admin and click **Connect to WeblioHub**. Nothing is sent before you click.
3. WeblioHub confirms the site through its public address. If your administrator e-mail is new to WeblioHub, you receive an e-mail to set your password; if it already has a WeblioHub account, you receive an e-mail to approve the connection.
4. Configure the widgets in WeblioHub → Settings and place their embed code from the Setup section.

The site must be reachable at its public address for the connection check. Sites on localhost or behind a password cannot be connected.

== Frequently Asked Questions ==

= Do I need a WeblioHub account? =

No. When you connect, a WeblioHub account is created for your administrator e-mail and you get an e-mail to set its password. If that e-mail already has an account, you approve the connection from that mailbox instead, and the site is added to your account as its own workspace.

= Is it free? =

Yes, there is a free plan. AI features, navigation, quick messages, the cookie policy, custom CSS and product search need a paid package with the IO feature.

= Where are my tokens and secrets stored? =

Telegram bot tokens and WhatsApp access tokens / app secrets are sent to WeblioHub once, over HTTPS, and stored there encrypted. They are never stored in WordPress.

= Can I use it on a staging or local site? =

The site must be publicly reachable for the connection check. A copied (staging) site is detected and can get its own connection, so the original site keeps its data.

= What happens when I uninstall the plugin? =

The plugin removes its options from WordPress and tells WeblioHub that the installation was removed. Your WeblioHub workspace and its data stay in your account.

== Source code ==

Everything in this plugin is shipped as readable source; there is no build step and no minified or compiled code. The admin screens (`assets/admin.js`, `assets/admin.css`) are hand-written and use the React and components that WordPress already includes (`wp.element`, `wp.components`).

Custom CSS for the widgets is not edited in WordPress; it is managed in the WeblioHub dashboard.

== External services ==

This plugin connects to the WeblioHub service operated by WeblioHub (https://www.webliohub.com). It is required: the chatbot, inbox, AI replies and reports are provided by this service.

The plugin talks to the WeblioHub API at `https://iaodtejrhijqkvlddedo.supabase.co/functions/v1/`:

* **When you click "Connect to WeblioHub"** (`wordpress-register`): the site address and name, the administrator e-mail address, the WordPress and plugin versions, whether WooCommerce is active, and a randomly generated installation ID and secret. WeblioHub then makes one request to this site's `/wp-json/webliohub/v1/verify` endpoint to confirm the plugin is installed there.
* **While connected** (`wordpress-installation`, `wordpress-workspace`): when an administrator opens the WeblioHub screens or saves settings, the requested page or the changed settings; about once an hour a status check with the plugin and WordPress versions; changes of the site address, site name or administrator e-mail; activation, deactivation and uninstall events.
* **When you connect Mailchimp**: the Mailchimp API key you enter and your settings, sent to WeblioHub and stored there encrypted. WeblioHub then sends new newsletter subscribers' e-mail addresses to your Mailchimp account (Mailchimp, operated by Intuit: https://mailchimp.com, terms https://mailchimp.com/legal/terms/, privacy https://www.intuit.com/privacy/statement/), and removes people who unsubscribe there from your list.
* **When you connect Telegram or WhatsApp**: the bot token, or the WhatsApp Business Account ID, phone number ID, access token and app secret you enter.

When AI product search is enabled on a WooCommerce site, WeblioHub reads your published products from the public WooCommerce Store API (`/wp-json/wc/store/v1/products`) to answer visitor questions.

The widget scripts you place on your site with the embed code load from the same service and send visitor messages, form entries, newsletter sign-ups and cookie consent choices to WeblioHub.

All requests after connecting are signed with this site's own secret. No site or visitor data is sent before you click Connect.

To offer updates, WordPress periodically downloads the version file `https://www.webliohub.com/downloads/webliohub.json`, and the new version from the same folder when you update. These requests happen before and after connecting and do not include your site address or any other site data.

* Terms of Service: https://www.webliohub.com/terms-of-service
* Privacy Policy: https://www.webliohub.com/privacy-policy

== Privacy ==

The plugin itself stores in WordPress only its settings, a random installation ID and an encrypted installation secret. Visitor data collected by the widgets is processed by WeblioHub as described in its Privacy Policy. If you use the widgets, mention WeblioHub in your site's privacy policy.

== Changelog ==

= 0.9.17 =
* Telegram: optional first message for the website button, like WhatsApp.

= 0.9.16 =
* Newsletter: the Mailchimp section shows the upgrade option on packages without the IO feature.

= 0.9.15 =
* Newsletter: connect your Mailchimp account and send new subscribers to your audience automatically (IO package). Confirmed sign-up is on by default.

= 0.9.14 =
* Updates now appear in WordPress: you get the usual update notice under Plugins and Dashboard → Updates and can update with one click. Sites on an older version upload this ZIP once with "Replace current with uploaded".

= 0.9.13 =
* The plugin is distributed from webliohub.com as "WeblioHub – AI Chatbot & Live Chat" (folder and text domain `webliohub`). To update, upload the new ZIP and choose "Replace current with uploaded".

= 0.9.11 =
* Custom CSS is no longer edited in the plugin (it is managed in the WeblioHub dashboard).
* Admin menu icon styles are added with wp_add_inline_style.
* Admin script and styles reformatted as readable source.

= 0.9.10 =
* AI replies follow the visitor's language automatically (the response language setting was removed).

= 0.9.9 =
* Contact form fields: tidier Show / Required layout.

= 0.9.8 =
* Nothing is sent to WeblioHub until an administrator clicks "Connect to WeblioHub" (explicit consent, with the list of data sent).
* readme: external services, privacy and FAQ.

= 0.9.7 =
* Connect, configure and disconnect Telegram and WhatsApp in the plugin (tokens and secrets go to WeblioHub only).
* Skeleton placeholders instead of loading text.

= 0.9.6 =
* Widgets are no longer injected automatically: copy the embed code from Settings → Setup and place it yourself.
* Pre-chat fields use Required / Optional / Hidden.

= 0.9.5 =
* IO package rules as in the Shopify app, with upgrade cards.
* Help FAQs, quick messages, pre-chat fields, calendar working hours, contact form fields and labels.

= 0.9.4 =
* Allowed domains are assigned automatically for the site.

= 0.9.2 – 0.9.3 =
* Widget settings are stored in WeblioHub; WooCommerce product search; shortcode `[webliohub_contact_form]`.

= 0.9.1 =
* Live data on the Dashboard, Messages, Tasks, Subscribers, Cookie report, Billing and Profile pages.

= 0.9.0 =
* New connection model: per-installation secret, site verification and signed requests.

== Upgrade Notice ==

= 0.9.8 =
Connecting to WeblioHub now always starts with your click on "Connect to WeblioHub".
