=== PlainAnswer ===
Contributors: mugengajp
Tags: chat, chatbot, ai, support, live chat
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add the PlainAnswer AI assistant to your site. It answers visitors 24/7 from your own content and hands off to you when it should.

== Description ==

PlainAnswer puts a friendly assistant on your website that answers your visitors' questions from your own content, your pages and FAQs, around the clock. When it is not sure, it captures the visitor's details for you instead of guessing, so no enquiry is lost.

This plugin is a lightweight connector. PlainAnswer is a hosted service: the answering, the widget's appearance, and your plan all live in your PlainAnswer dashboard. The plugin's only job is to load the PlainAnswer widget on the front end of your site, pointed at your account key. It does not process your visitors' data itself.

**What you get**

* A one-field setup: paste your PlainAnswer key and you are live.
* A "Test connection" button that checks your key is recognised before you leave the page.
* An on/off switch to hide the widget site-wide without removing your key.
* Nothing to slow your site down: a single small, asynchronous script.

**You need a PlainAnswer account.** You can create one free, with no card, at [plainanswer.co.uk](https://plainanswer.co.uk).

== External services ==

This plugin connects your site to PlainAnswer, a hosted assistant service provided by Culture & Clarity Ltd. PlainAnswer is what actually answers your visitors and powers the chat widget. The plugin's only job is to load that widget on your site using your account key.

What the service is used for: to show the PlainAnswer chat widget on your front end and answer visitors from your content, and to capture an enquiry (for example a name, email or phone number) when the assistant hands off to you.

What data is sent, and when:

* On the front end, when a page loads with the widget enabled, the visitor's browser requests the loader script from `https://plainanswer.co.uk/embed.js?key=YOUR_KEY`. From that point the conversation runs between the visitor's browser and the PlainAnswer service under your account. What a visitor types, and any contact details they choose to leave, are sent to PlainAnswer to generate answers and to pass enquiries back to you. The plugin itself does not collect or store visitor data.
* In the admin, when you click "Test connection" on the settings screen, your site makes a single server-side request to the same `/embed.js` URL with the key you entered, only to confirm the key is recognised. No visitor data is involved in that check.

You need a PlainAnswer account to use this plugin. By using the service you agree to its terms and privacy policy:

* Terms of Service: https://plainanswer.co.uk/terms
* Privacy Policy: https://plainanswer.co.uk/privacy

== Installation ==

1. In your WordPress admin, go to **Plugins > Add New > Upload Plugin** and upload the plugin zip, then click **Activate**. (Or copy the `plainanswer` folder into `wp-content/plugins/` and activate it from the Plugins screen.)
2. Go to **Settings > PlainAnswer**.
3. Paste your **PlainAnswer key** (find it in your PlainAnswer dashboard, on the Embed tab, it is the value after `key=` in your embed snippet).
4. Click **Test connection** to confirm the key works, then **Save Changes**.
5. Visit your site, and the assistant appears in the corner.

== Frequently Asked Questions ==

= Do I need a PlainAnswer account? =

Yes. This plugin connects your site to the PlainAnswer service. You can create a free account, with no card, at plainanswer.co.uk, then copy your key into the plugin.

= Where do I find my key? =

In your PlainAnswer dashboard on the Embed tab. It is the short code after `key=` in the embed snippet PlainAnswer gives you.

= Does the plugin collect or store my visitors' data? =

No. The plugin only loads the PlainAnswer widget on your pages. All conversations are handled by the PlainAnswer service under your account. See PlainAnswer's own privacy and terms pages for how the service handles data.

= How do I change how the widget looks? =

The widget's avatar, colours, greeting and behaviour are set in your PlainAnswer dashboard, not in this plugin, so a change there updates your live widget without touching WordPress.

= How do I temporarily hide the widget? =

Untick "Show the widget" on the settings page and save. Your key stays saved; the widget just stops appearing until you turn it back on.

= Can I stop the widget on certain pages? =

Yes, for developers: return false from the `plainanswer_should_render` filter for the requests where you don't want it. You can also point the plugin at a different PlainAnswer origin with the `plainanswer_origin` filter.

== Screenshots ==

1. The settings screen: paste your key, test the connection, and go live.
2. The PlainAnswer widget answering a visitor on the front end.

== Changelog ==

= 1.0.0 =
* First release: key-based setup, front-end embed, server-side "Test connection", and an on/off switch.

== Upgrade Notice ==

= 1.0.0 =
First release.
