=== Chatvio – AI Webchat ===
Contributors: ravimareedu
Tags: ai chat, chat widget, live chat, whatsapp chat, web chat
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2.9
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Floating AI chat button for WordPress: icons, positions, animations, display rules. Every chat lands in one shared inbox (web chat + WhatsApp).

== Description ==

**Chatvio – AI Webchat** adds a floating chat button to your WordPress site. Click it and visitors are instantly chatting with your team — over the web chat on your site or WhatsApp — with every conversation landing in one shared Tech Pad inbox with automations, campaigns and human handoffs.

* **A real chat window** — not just a link. Visitors type in a chat panel right on your page; replies arrive in your Tech Pad team inbox.
* **8 ready-made launcher icons** — chat bubble, bubble with dots, WhatsApp logo, headset and more, or upload your own image/GIF.
* **Any position** — bottom-right, bottom-left, bottom-centre, side-centre, top corners or fully custom offsets. Separate position and size for **desktop and mobile**.
* **Animations** — pulse, bounce, shake or ring to draw attention.
* **Display rules** — show on the whole site or chosen pages only, hide on specific post types, desktop/mobile only, logged-in/guests only, time or scroll delay, and business-hours scheduling.
* **WhatsApp quick-launch icon** — when your Tech Pad number is connected, visitors get the green WhatsApp icon next to the chat button.
* **AI-powered replies** — the Tech Pad AI Copilot can answer visitors instantly from your dashboard, and hand off to a human any time.
* **Free to start, no API keys** — connect with just your admin email (the plugin creates your free Tech Pad workspace and chat key automatically), or paste a public key from your dashboard.
* **Shortcode** — drop an inline chat button anywhere with `[techpad_ai_chat]`.
* **Google Analytics** — optional dataLayer event on every click (off by default).

The chat window, greeting, pre-chat form, agent handoffs and automations are all managed from your Tech Pad dashboard — this plugin just puts the button on your site.

== Installation ==

1. Upload the `chatvio-ai-webchat` folder to `/wp-content/plugins/`, or install the zip via **Plugins → Add New → Upload Plugin**.
2. Activate the plugin.
3. Go to **The Tech Pad → Chatvio – AI Webchat**.
4. Enter your admin email and click **Connect** — the plugin creates your free Tech Pad workspace and chat key automatically (a magic link opens your inbox). Already have a key? Paste your Tech Pad public key instead.
5. Pick an icon, position and animation, then **Save settings**.
6. Use the **Preview button** link to see the chat button on your site.

That's it — visitors can chat with you immediately.

== External services ==

This plugin connects your site to **The Tech Pad** (thetechpad.com), the messaging workspace that hosts the chat. The connection is required: the chat window, inbox, AI replies and agent handoffs are provided by the service.

* **What the service is used for:** the chat button loads a small widget script from The Tech Pad that opens the chat panel on your pages; conversations (web chat and, when a number is connected, WhatsApp) are delivered to your Tech Pad team inbox, where AI Copilot and human agents reply.
* **What data is sent, and when:**
  * On connect: the admin email you entered, your site URL and site name, so the workspace and chat key can be created and this site allowed.
  * When a visitor opens the chat and sends a message: their message text and the page they are on (sent to The Tech Pad so the AI can answer from your site content). Visitors never need an account.
  * The widget script is loaded from `thetechpad.com/chat/widget.js` on pages where the button is shown.
* **How it is protected:** all traffic goes over HTTPS. The Tech Pad's [Terms of Service](https://thetechpad.com/terms) and [Privacy Policy](https://thetechpad.com/privacy) apply to this service.

== Frequently Asked Questions ==

= Do I need a Tech Pad account? =

Yes — the chat runs on The Tech Pad platform. Connect with your admin email and the plugin creates a free workspace automatically (a magic link opens your inbox), or sign up at thetechpad.com and paste your public key. Visitors never need an account or an app.

= Can visitors chat on WhatsApp too? =

Yes. When your Tech Pad number is connected, the green WhatsApp quick-launch icon appears next to the chat button, and web chat + WhatsApp conversations all land in the same inbox.

= Where do I find my public key? =

Log in at thetechpad.com → open **Web Chat** settings → copy the **publishable (public) key**. It's safe to embed in your site — it only lets visitors open a chat. (You don't need it at all if you use the one-click email connect.)

= What data is sent to The Tech Pad? =

Only what is needed to run the chat: your site URL and admin email at connect time, and the messages visitors send with the page they were on. See the "External services" section above for the full details and links to The Tech Pad's Terms of Service and Privacy Policy.

= Can I show the button only on some pages? =

Yes. Under **Display rules** choose "Only on the pages listed below" and enter page URLs or IDs (one per line). You can also hide the button on specific post types, limit it to desktop or mobile, and schedule business hours.

= Can I change the icon? =

Yes — pick from 8 ready-made icons or upload your own image/GIF. Change the button background and icon colours with the colour pickers.

= Can I add the button inside a page, not floating? =

Yes — use the shortcode `[techpad_ai_chat]` (options: `label`, `size`, `icon`, `color`) anywhere in your content.

== Screenshots ==

1. Connect the plugin with your email on the General tab — workspace and chat key are created for you.
2. Pick one of eight ready-made launcher icons or upload your own image.
3. Choose position, size and colours — separately for desktop and mobile.
4. Display rules: pages, post types, devices, visitors and business hours.
5. The floating chat button on your site, with the chat panel open.
6. The chat panel with an AI reply and the WhatsApp quick-launch icon.
7. An inline chat button placed in a page with the shortcode.
8. The same button on mobile — smaller size, thumb-friendly position.

== Changelog ==

= 1.2.9 =
* New name for the WordPress.org directory: **Chatvio – AI Webchat**.
  The same plugin with the same settings and the same storage — nothing
  to reconfigure, and no change to how the chat button or the inbox works.

= 1.2.8 =
* Fix: saving one tab no longer resets the others. Each tab is its own
  form, so saving "Position & size" (or any tab) used to write the
  defaults for every setting it does not show — the chat button switched
  itself off and the saved connection details were wiped. A tab now keeps
  the values it does not edit.
* Nothing else changed: same settings, same storage, no migration.

= 1.2.7 =
* Fix: the floating chat button opens the chat window again. The button's
  script was running before the button existed in the page, so it never
  attached its click handler — the button looked fine and did nothing, on
  every site, with nothing in the browser console to explain it. The script
  now waits for the page and loads deferred.
* Nothing else changed: same settings, same storage, no migration.

= 1.2.6 =
* Fix: the settings screen under The Tech Pad opens again. On a site where
  this plugin was the first Tech Pad plugin installed, its menu row opened
  the shared page instead of this plugin's own screen, so the tabs and
  buttons answered "Sorry, you are not allowed to access this page".
  The row is labelled **Chatvio – AI Webchat** and opens the plugin's screen;
  the first row of the menu is **The Tech Pad**, a short list of every
  Tech Pad plugin you have installed.

= 1.2.5 =
* The settings screen now lives where the rest of the family lives:
  **The Tech Pad → Chatvio – AI Webchat** (it used to be under Settings).
  Old bookmarks and links from support still work.
* If this site already has a Tech Pad workspace, the plugin finds it and
  connects on its own — no email to type.
* The chat button is no longer shown until the plugin is connected: a
  button that could not open the chat window is worse than no button.
  The settings page says so, and 'Test the connection' reports exactly
  what the visitor's browser would get (including a key that belongs to
  another site).

= 1.2.4 =
* Fix for WordPress.org Plugin Check: the notice shown in the admin
  when another Tech Pad chat plugin is already displaying the button
  used a text domain that did not belong to this plugin. It now uses
  this plugin's own text domain. The wording, the button and every
  setting are unchanged.

= 1.2.3 =
* One floating chat button per page, always: if you also run one of our
  other chat plugins, the two no longer both appear — the button that
  should win is chosen automatically, and the other plugin says so in
  plain words on its own settings page. On a site with only this plugin
  installed nothing changes at all.
* The Preview button in settings always shows your own button, whoever
  owns the live one.

= 1.2.2 =
* Compatibility: the Tech Pad chat script is now loaded through the WordPress
  script API (registered, enqueued and deferred) instead of a hard-coded
  script tag, and the custom CSS from the Advanced tab is appended to the
  launcher stylesheet. Nothing changes for visitors.
* Tested up to WordPress 7.1.

= 1.2.1 =
* Readme brought to WordPress.org directory standard: contributor credit, external-service disclosure with Terms of Service and Privacy Policy links, screenshot list and upgrade notice.

= 1.2.0 =
* New: connect automatically with just your email — the plugin creates your
  free Tech Pad workspace, generates the chat key and allows this site in one
  step. No dashboard visit, no API keys. A magic link opens your inbox.
* New: connection status notices on the settings page (success / failure
  reasons shown inline).

= 1.1.0 =
* New: choose your WhatsApp target — your connected Tech Pad number (verified,
  unified inbox), any other number (wa.me deep link, no connection needed), or
  no WhatsApp button at all.
* New: custom WhatsApp number field for merchants who haven't connected a number
  in Tech Pad yet — connect it later to bring those chats into the shared inbox.

= 1.0.1 =
* Tech Pad public key is now locked by default once saved — masked, disabled, with an Edit
  button. A locked form can no longer wipe the saved key with a blank save.

= 1.0.0 =
* Initial release. Floating chat button powered by The Tech Pad web chat: 8 icons, custom icon upload, colours, shapes, desktop/mobile positions, animations, display rules, business hours, WhatsApp quick-launch icon, shortcode, GA tracking and custom CSS.

== Upgrade Notice ==

= 1.2.9 =
The directory listing is now named Chatvio – AI Webchat (the name shown
in Plugins). Same plugin, same settings.

= 1.2.8 =
Fix: saving a settings tab no longer switches the button off or wipes
the connection details. No settings change.

= 1.2.7 =
Fix: clicking the floating chat button now opens the chat window. The
button's script ran before the button existed. Update to get it working.

= 1.2.6 =
Fix: the settings screen under The Tech Pad is reachable again (its tabs
and buttons work). No settings change.

= 1.2.5 =
The settings screen moved to The Tech Pad menu, and an existing
workspace is now connected automatically. No settings change.

= 1.2.4 =
Fix for Plugin Check: one admin notice used the wrong text domain.
No settings or behaviour change.

= 1.2.3 =
Adds a shared launcher arbiter: with more than one of our chat plugins
active you now get one floating button per page instead of two, and the
plugin that is not showing tells you why. No settings change.

= 1.2.2 =
Compatibility and standards update: the chat script now loads through the WordPress script API and "Tested up to" is WordPress 7.1. No settings change.

= 1.2.1 =
Readme-only update bringing the plugin to WordPress.org directory standard. No settings or behaviour changed.
