=== Elfsight AI Chatbot ===
Contributors: elfsight
Tags: chatbot, ai chatbot, ai agent, live chat, support
Requires at least: 5.8
Tested up to: 7.0
Stable tag: 1.1.0
Requires PHP: 7.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add an Elfsight AI Chatbot to your site — paste your widget ID or install code and place it via footer, shortcode, or block.

== Description ==

Elfsight AI Chatbot lets you add an AI agent to your WordPress website in minutes.
Create a chatbot trained on your business data on [elfsight.com](https://elfsight.com/ai-chatbot-widget/?utm_source=markets&utm_medium=wordpress-org&utm_content=readme-description&utm_campaign=ai-chatbot),
then connect it here to automate customer support, capture leads, drive sales,
and answer questions 24/7 — no coding required.

You configure the chatbot in the Elfsight dashboard; this plugin takes care of
embedding it correctly on your WordPress site.

= Features =

* **Guided setup** — a two-step screen: create your widget in Elfsight, then paste the install code and click Add. No page reloads.
* **Widget card** — once added, the widget shows as a card with its preview, name, an Edit link, a Show/Hide toggle, and a quiet "Replace with a different widget" link.
* **Smart setup check** — the plugin confirms your widget is ready to go and warns you if the ID looks wrong or belongs to a different widget.
* **Automatic placement** — floating chatbots appear on every page with no extra steps.
* **Shortcode** — place the chatbot exactly where you want with `[elfsight_ai_chatbot]` (required for the "embed" layout).
* **Block editor** — insert the "Elfsight AI Chatbot" block from the Widgets category.
* **Show/hide toggle** — temporarily disable the chatbot without deleting your widget ID.
* **Quick edit link** — jump straight to your widget in the Elfsight dashboard from the settings and plugins screens.

= External services =

This is the official Elfsight plugin. It connects your WordPress site to Elfsight,
a third-party SaaS where your AI Chatbot is created, trained and managed. The plugin
itself only stores the widget ID you enter; all chatbot functionality is provided
by the Elfsight service.

* When you save a widget ID, the plugin contacts Elfsight to confirm the widget exists and to detect how it should be placed on your site. Only the widget ID is sent — no personal or site data.
* On the front end, the chatbot is rendered by Elfsight's widget platform, loaded from the Elfsight CDN.

By using this plugin you agree to Elfsight's [Terms of Service](https://elfsight.com/terms-of-service/) and [Privacy Policy](https://elfsight.com/privacy-policy/).

== Installation ==

1. Upload the `elfsight-ai-chatbot` folder to the `/wp-content/plugins/` directory, or install the plugin through the Plugins screen in WordPress.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Go to **Settings → Elfsight AI Chatbot**, paste your widget ID (or the whole Elfsight install code), and click Add.
4. The plugin verifies the widget with Elfsight and shows it as a card — no page reload.
5. Floating chatbots appear automatically on every page. If your widget uses the "embed" layout, place it with the `[elfsight_ai_chatbot]` shortcode or the "Elfsight AI Chatbot" block.

== Frequently Asked Questions ==

= Where do I get my widget ID? =

Create a chatbot at [elfsight.com](https://elfsight.com/ai-chatbot-widget/?utm_source=markets&utm_medium=wordpress-org&utm_content=readme-faq&utm_campaign=ai-chatbot) and open
your install code. It looks like `<div class="elfsight-app-WIDGET-ID"></div>`. Paste
the WIDGET-ID part — or the whole install code — into the plugin settings, and the ID
will be extracted for you.

= My chatbot does not appear on the page. Why? =

Most likely your widget uses the "embed" layout, which is not placed automatically.
Add the `[elfsight_ai_chatbot]` shortcode (or the "Elfsight AI Chatbot" block) to the
page or post where it should appear. Also make sure "Show on site" is enabled on the
settings page.

= How do I place the chatbot on a specific page only? =

Leave floating layouts to appear automatically, or use the `[elfsight_ai_chatbot]`
shortcode / block on the exact page or post where you want the chatbot.

= How do I temporarily hide the chatbot? =

Turn off "Show on site" on the settings page. Your widget ID is kept, so you can
re-enable it any time.

= Is an Elfsight account required? =

Yes. The chatbot itself is created and configured in your Elfsight account. This
plugin embeds it on your WordPress site.

== Screenshots ==

1. Plugin settings — connect your Elfsight AI Chatbot widget.
2. The AI Chatbot widget on the front end.

== Changelog ==

= 1.1.0 =
* Redesigned settings screen: guided two-step setup and a widget card (preview, name, Edit, show/hide toggle) with a quiet "Replace" link — all AJAX-based, no page reloads. No front-end changes.

= 1.0.0 =
* Initial release: widget ID / install-code input with automatic ID extraction, widget validation via Elfsight, automatic footer placement, shortcode, block, show/hide toggle, and a dashboard edit link.

== Upgrade Notice ==

= 1.1.0 =
Redesigned settings screen. Your saved widget and settings are preserved.

= 1.0.0 =
Initial release.
