=== ChatNova AI Chatbot — No-Code AI Chat Widget for WordPress ===
Contributors: chatnova
Donate link: https://chatnova.app/
Tags: ai chatbot, chatbot, customer support, live chat, ai chat, chatbot builder, openai, gpt, automation, lead capture, conversational ai, support chat, intelligent chatbot
Requires at least: 5.5
Tested up to: 6.7
Stable tag: 2.0.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add a trained AI chatbot to your WordPress site in 60 seconds — no coding needed. Train on your docs, URLs & FAQs. Works with any theme.

== Description ==

**ChatNova AI Chatbot** is the easiest way to add a smart, branded AI assistant to your WordPress website. Paste one key, hit Save, and your chatbot is live.

Unlike generic live chat plugins, ChatNova lets you **train the AI on your own content** — product docs, support articles, web pages, PDFs — so it answers questions specific to *your* business, 24/7.

> **[Get your free chatbot at chatnova.app →](https://chatnova.app)**

---

### Why businesses choose ChatNova

* ⚡ **60-second setup** — install plugin, paste key, done
* 🧠 **Trained on your content** — upload docs, add URLs, paste text; the AI learns your knowledge base
* 💬 **Natural conversations** — powered by the latest LLMs for human-like responses
* 📥 **Built-in lead capture** — collect name, email, and phone before a conversation starts
* 📊 **Full analytics dashboard** — see top questions, satisfaction scores, and conversation volume
* 🎨 **Brand-customizable** — match your colors, set a custom name and greeting
* 📱 **Fully responsive** — looks great on desktop, tablet, and mobile
* 🌍 **Multilingual** — responds in the visitor's language automatically
* 🔒 **Privacy-first** — GDPR compliant; data stored on secure ChatNova servers
* 🚀 **Always up-to-date** — the widget loads from our CDN so you always get the latest version

---

### Perfect for

| Business type | Use case |
|---|---|
| E-commerce | Product questions, order tracking, return policy |
| SaaS | Onboarding, feature explanations, troubleshooting |
| Healthcare | Appointment FAQs, clinic info, service info |
| Real estate | Property listings, viewing requests, mortgage FAQs |
| Education | Course info, admissions, enrollment guidance |
| Restaurants | Menu, reservations, hours, allergen info |
| Law firms | Service overview, appointment booking |
| Any business | 24/7 customer support, lead generation |

---

### How it works

1. **Create** a chatbot in your [ChatNova dashboard](https://chatnova.app/dashboard)
2. **Train** it — upload PDFs, add website URLs, paste text or FAQs
3. **Copy** the Chatbot Key (starts with `cn_live_...`)
4. **Paste** the key in the plugin settings and save
5. Your chatbot is **live** on every page of your WordPress site

---

### Service information

This plugin connects to the **ChatNova API** (chatnova.app) to load the chat widget and process AI conversations. The following external requests are made:

* `https://chatnova.app/chatbot/widget.js` — loads the chat UI (only when a chatbot key is configured)
* `https://chatnova.app/api/v1/chat/*` — processes messages when a visitor sends one

No data is sent to external servers unless a visitor opens and interacts with the chatbot widget. By using this plugin you agree to the [ChatNova Terms of Service](https://chatnova.app/terms) and [Privacy Policy](https://chatnova.app/privacy).

---

### Requirements

* Free ChatNova account — [sign up here](https://chatnova.app/signup)
* WordPress 5.5+
* PHP 7.4+
* A chatbot key from your dashboard

== Installation ==

= Automatic (recommended) =

1. In your WordPress admin, go to **Plugins → Add New**
2. Search for **ChatNova AI Chatbot**
3. Click **Install Now**, then **Activate**
4. Go to **ChatNova** in the left admin menu
5. Paste your Chatbot Key and click **Save Settings**

= Manual =

1. Download the `.zip` file from the WordPress plugin directory
2. In your WordPress admin, go to **Plugins → Add New → Upload Plugin**
3. Upload the zip, click **Install Now**, then **Activate**
4. Go to **ChatNova** in the left admin menu
5. Paste your Chatbot Key and click **Save Settings**

= Getting your Chatbot Key =

1. Go to [chatnova.app](https://chatnova.app) and sign up (free)
2. Create a new chatbot and train it with your content
3. Open the chatbot, go to **Deploy** tab
4. Copy the key — it looks like `cn_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
5. Paste it in the plugin settings

== Frequently Asked Questions ==

= Do I need a ChatNova account? =

Yes, a free account is required. Sign up at [chatnova.app](https://chatnova.app) — no credit card needed.

= Will this slow down my website? =

No. The widget script is loaded with `defer` in the footer, so it has zero impact on your page's Time to First Byte and First Contentful Paint scores.

= Can I train the chatbot on my own content? =

Yes — this is ChatNova's core feature. Upload PDFs, add website URLs, paste FAQs, or connect your knowledge base from your ChatNova dashboard.

= Does it work with Elementor, Divi, and other page builders? =

Yes. The plugin injects a floating widget that works alongside any theme or page builder.

= Can I hide the chatbot on specific pages? =

Yes. In the plugin settings there is an "Exclude from Pages" field where you can enter comma-separated page/post IDs.

= Can I hide the chatbot on mobile devices? =

Yes. Enable the "Hide on Mobile" toggle in the settings.

= Is the chatbot GDPR compliant? =

ChatNova is designed with privacy in mind. No data is collected from visitors until they interact with the chatbot. See our full [Privacy Policy](https://chatnova.app/privacy).

= What languages does the chatbot support? =

The AI automatically responds in the visitor's language. The admin settings panel supports full WordPress i18n/l10n.

= Can I use multiple chatbots on different pages? =

The plugin uses one chatbot key globally. For page-specific bots, use the exclude list and load the embed code manually on individual pages.

= Where is my data stored? =

Conversation data is stored securely on ChatNova's servers. See our [Privacy Policy](https://chatnova.app/privacy) for full details.

== Screenshots ==

1. **Admin settings panel** — clean, two-step setup
2. **Chatbot widget on a live site** — floating button, branded header
3. **Conversation in action** — AI answering a product question
4. **ChatNova dashboard** — train your bot, monitor analytics

== Changelog ==

= 2.0.1 – 2026-03-05 =
* Fix: widget now loads correctly — replaced `wp_enqueue_script` + `defer` strategy (which broke `document.currentScript` and prevented `data-chatbot-key` from being read) with a direct `<script async>` tag output in `wp_footer`

= 2.0.0 – 2026-03-04 =
* **Rewrite** — plugin now loads the hosted `widget.js` from chatnova.app CDN; always up-to-date, no local JS/CSS to maintain
* New simplified settings page with visual status banner and step-by-step instructions
* Added "Widget Position" setting (bottom-right / bottom-left)
* Added "Hide on Mobile" toggle
* Added "Exclude from Pages" setting (comma-separated page IDs)
* Removed legacy JWT token / owner ID fields — replaced by single Chatbot Key
* Admin page now uses inline CSS (zero extra HTTP requests)
* Improved sanitization and escaping throughout
* Updated readme.txt for WordPress.org SEO

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 2.0.0 =
Major update — the plugin now uses a single Chatbot Key instead of an API key + JWT flow. After upgrading, go to **ChatNova** in your admin menu and paste your Chatbot Key (found in your ChatNova dashboard → Chatbots → Deploy tab). Your old API key settings are no longer used.
