=== Talkito - Online Chat ===
Contributors: talkito
Tags: live chat, customer support, chat widget, AI assistant, Bale
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.3.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add the Talkito online chat widget to your WordPress site with a public website token from your Talkito account.

== Description ==

Talkito adds an online chat button and conversation window to the public pages of your WordPress site. Configure the widget appearance, position, welcome messages, and AI assistant options in your Talkito account, without editing your theme.

A Talkito account and public website token are required. Depending on the selected plan, the Talkito service may be free or paid. All code in this plugin is provided under the GPL without restrictions.

= Talkito features =

* **Persian live chat:** Receive and reply to visitor messages in the Persian Talkito dashboard.
* **Bale integration:** Receive customer messages and images in Bale, then send replies back to the same website conversation.
* **AI assistant:** Connect an OpenAI-compatible provider or GapGPT to provide automated replies. A selected free service may also be available.
* **Multiple websites:** Create a separate widget script and chat inbox for each website while managing them from one account.

Access to Bale, the AI assistant, and the number of websites depends on your active plan. General widget appearance and messaging settings apply at the account level; business hours can be configured for each inbox.

1. Copy the widget token from your [Talkito account](https://talkito.ir/profile/widget).
2. Install and activate the plugin.
3. Open **Settings → Website Chat**, enter the token, and save the settings.
4. Customize the widget appearance and position in your Talkito account.

Until a token is saved and the widget is enabled, the plugin does not load any external scripts. The plugin does not automatically send the WordPress user's ID, name, email address, or avatar.

== External service ==

This plugin connects to the Talkito service to display and operate online chat. The connection is made only after a site administrator enters a public widget token and enables the widget. In the chat dashboard, conversation content is available only to the visitor and authorized members of the support team for that account. If the site administrator enables Bale or an AI assistant, only the content required for that feature is sent to the selected service. Details about data processing are available in the [Talkito privacy policy](https://talkito.ir/privacy).

== Installation ==

1. Install the ZIP file through **Plugins → Add New → Upload Plugin**, or copy the `talkito-chat` directory to `wp-content/plugins`.
2. Activate the plugin.
3. Open **Settings → Website Chat**.
4. Enter and save the public widget token from your Talkito account.

== Frequently Asked Questions ==

= Does the plugin work without a Talkito account? =

No. This plugin connects WordPress to the Talkito service and needs a public widget token to display online chat.

= Does the plugin send WordPress user profiles to Talkito? =

No. The plugin does not automatically send the name, email address, ID, or avatar of a logged-in WordPress user. Only the data described in the External service section is transferred to operate the widget and provide chat.

= How do I temporarily disable the widget? =

Turn off **Display widget on the site** on the plugin settings page. Talkito scripts are not loaded while the widget is disabled.

== Changelog ==

= 1.3.3 =
* Keep widget boot and duplicate detection separate for each website token and Talkito host.
* Allow a different widget embed on the same site to connect independently.
* Describe token-scoped conversation and chat-opening-message cookies in the privacy notice.

= 1.3.2 =
* Safely reject malformed widget tokens in submitted and stored settings.
* Reuse matching SDKs under standard handles, dependencies, or already printed scripts.
* Preserve deferred SDK loading and detect bootstrap errors before the script tag loads.

= 1.3.1 =
* Added support for PHP 7.4 and later.
* Kept duplicate SDK detection compatible with PHP 7.4.

= 1.3.0 =
* Prepared plugin metadata and documentation for WordPress.org.
* Documented the external service and privacy practices.
* Made admin text and the privacy-policy notice translatable.
* Removed unused CSS from the release package.

= 1.2.0 =
* Simplified the admin settings to widget status, token, and floating-button visibility.
* Load the SDK from the production `/widget/sdk.js` URL.
* Removed WordPress user identity sharing and AI-assistant status requests.
* Added data migration, multisite support, privacy information, and duplicate-embed prevention.

= 1.1.0 =
* Integrated the plugin with Talkito accounts and widget settings.

= 1.0.0 =
* Initial release with token configuration and widget display.
