=== AskAnyDocs Chatbot ===
Contributors: askanydocs
Tags: chatbot, ai chatbot, customer support, live chat, askanydocs
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add your AskAnyDocs AI chatbot to WordPress without editing your theme.

== Description ==

AskAnyDocs Chatbot connects an existing AskAnyDocs bot to a WordPress website. Configure the Bot ID once, and the plugin loads the chatbot from app.askanydocs.com on public pages.

Features:

* No theme edits required.
* Enable or disable the widget from WordPress settings.
* Optionally passes the signed-in WordPress user's ID, display name, and email to AskAnyDocs.
* Provides a filter for developers who need page-level visibility rules.

You need an AskAnyDocs account and an active bot. The chatbot itself, conversations, and knowledge sources are managed by the AskAnyDocs service. AskAnyDocs offers free and paid plans.

Service links:

* [AskAnyDocs service](https://app.askanydocs.com/)
* [Pricing](https://askanydocs.com/#pricing)
* [Privacy Policy](https://askanydocs.com/privacy)
* [Terms of Service](https://askanydocs.com/terms)

== External service ==

This plugin relies on AskAnyDocs, an external software-as-a-service platform, to provide the chatbot. An AskAnyDocs account and bot are required.

When an administrator enables the widget and enters a Bot ID, public pages load the widget JavaScript from `https://app.askanydocs.com`. Loading the widget sends a normal web request to AskAnyDocs. When a visitor uses the chatbot, the plugin and widget send the visitor's chat messages and technical metadata needed to operate the service. This metadata may include the current page URL, referrer, browser language, platform, time zone, screen size, and viewport size. The widget uses browser local storage to preserve conversation and display state.

The plugin does not send the signed-in WordPress user's profile by default. If an administrator explicitly enables **Signed-in user** sharing, the WordPress user ID, display name, and email address are also sent to AskAnyDocs.

The data is sent to AskAnyDocs only to load and operate the configured chatbot, maintain its conversation state, provide answers, and support features configured by the AskAnyDocs account owner. Use of the service is governed by the [AskAnyDocs Terms of Service](https://askanydocs.com/terms) and [Privacy Policy](https://askanydocs.com/privacy).

== Installation ==

1. Upload the `askanydocs-chatbot` folder to `/wp-content/plugins/`, or install the provided ZIP through **Plugins > Add New > Upload Plugin**.
2. Activate **AskAnyDocs Chatbot**.
3. Open **Settings > AskAnyDocs Chatbot**. If you do not have an AskAnyDocs account yet, use the **Create free account** button shown there.
4. In AskAnyDocs, create a bot and add the website pages, documents, or other knowledge it should use.
5. Open that bot's **Settings** page, copy the Bot ID shown at the top, and paste it into WordPress.
6. Save the settings.
7. If your bot restricts allowed domains, add the WordPress site's domain in AskAnyDocs.

== Frequently Asked Questions ==

= Where do I find the Bot ID? =

Open **Bots** in AskAnyDocs, select your bot, and open **Settings**. The Bot ID is displayed at the top of that page. The WordPress settings page also contains direct links to registration and your bot list.

= Can I hide the chatbot on selected pages? =

Yes. Use the `askanydocs_chatbot_should_enqueue` filter in a theme or site-specific plugin. For example:

`add_filter('askanydocs_chatbot_should_enqueue', function ($show) { return $show && !is_page('checkout'); });`

= Does the plugin send WordPress user data? =

Not by default. An administrator can explicitly enable sending the signed-in user's ID, display name, and email. Review your privacy notice before enabling it.

= Does uninstalling the plugin delete its settings? =

Yes. Removing the plugin through WordPress deletes the plugin's saved settings.

== Changelog ==

= 1.0.1 =

* Add optional signed-in WordPress user context before the chatbot script.
* Improve onboarding instructions, privacy disclosure, and AskAnyDocs branding assets.

= 1.0.0 =

* Initial release.
