=== AxiaChat AI – Free AI Chatbot (Answers Customers Automatically) ===
Contributors: estebandezafra
Tags: ai chatbot, chatgpt, woocommerce, customer support, google gemini
Requires at least: 5.9
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 4.1.10
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The best AI Chatbot for WordPress. Like having ChatGPT trained on your content — turn your site into a 24/7 sales & support machine.

== Description ==

## 🤖 The best free AI Chatbot for WordPress

If you want more leads, more sales, and less repetitive support work, you need a powerful chatbot on your website.

AxiaChat AI is the best AI chatbot for WordPress designed to help you automate conversations, capture opportunities, and assist visitors instantly — 24 hours a day.

This is not just another basic chatbot.  
This is a smart, business-ready chatbot built for real results — like having a private ChatGPT that knows your business inside out.


## ⚡ Why This Chatbot Is Different

Most WordPress chatbot plugins only provide simple scripted replies.

AxiaChat AI gives you a real AI-powered chatbot — backed by the same technology as ChatGPT — that understands context, learns from your content, and responds like a human assistant.

Your chatbot can:

✅ **Answer product questions** automatically, 24/7
✅ **Guide customers** to the right service or product
✅ **Capture leads** automatically — even when you're offline
✅ **Book appointments** directly from the chat
✅ **Analyze images & documents** — visitors send photos or PDFs, the AI sees and responds
✅ **Reduce support workload** by handling repetitive questions
✅ **Work 24/7** without breaks, staff costs, or delays

This chatbot becomes part of your team. That's what real AI chat for WordPress looks like.

## ⭐ What Users Say

⭐⭐⭐⭐⭐ **"The only WooCommerce chatbot plugin that actually works"**
"Congratulations to the developer for an excellent job. The plugin is well built, reliable, and delivers exactly what it promises." — gabricp100, February 2026

⭐⭐⭐⭐⭐ **"My conversion rate went up thanks to this chatbot!"**
"Perfect for small businesses. My conversion rate went up thanks to this chatbot!" — david25k, February 2026

⭐⭐⭐⭐⭐ **"Customizable and powerful"**
"I love how customizable it is, you can train your own AI agent and make it fit your brand." — queroamilys, March 2026

⭐⭐⭐⭐⭐ **"It works great!"**
"We implemented it in the store and it works great." — Antonio Aponte, February 2026

**12 reviews on WordPress.org · 100% five-star ratings.**
[Read all reviews →](https://wordpress.org/support/plugin/axiachat-ai/reviews/)

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/axiachat-ai` directory, or install through the WordPress plugin screen.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Run the Easy Setup Wizard.
4. Add your AI provider API key.
5. Test your chatbot using the built-in preview — click "Preview Bot" in the bot settings to see it live before deploying globally.


## 📈 Built for Growth

Whether you run an eCommerce store, agency, SaaS, or local business, this chatbot helps you scale without hiring more staff.

Instead of answering the same questions every day, let your chatbot handle them.

Instead of missing leads after hours, let your chatbot capture them.

Instead of losing visitors, let your chatbot engage them instantly.

A smart chatbot increases conversions.  
A fast chatbot improves user experience.  
A trained chatbot builds trust.

## 🎓 Train Your Chatbot on Your Own Content

What makes this chatbot powerful is its ability to learn from your website.

You can train your chatbot using:

📘 Pages and posts
🛒 WooCommerce products (prices, stock, SKU — always up to date)
❓ FAQs
📄 PDFs
🧠 Custom knowledge bases
🌐 External web pages

And your visitors can send files directly in the chat:

📸 **Photos & screenshots** — the AI literally sees the image using vision AI
📄 **PDF documents** — text is extracted automatically and analyzed in context

Imagine a customer sending a photo of their broken appliance, or uploading a contract for the AI to summarize. That's not future tech — it works today.

This means your chatbot gives accurate answers based on YOUR business — not generic internet responses.

Your visitors talk to a specialized chatbot, not a random AI. Genuine AI chat powered by your own knowledge base.

## 🎯 Designed for Conversions

This is not just a support chatbot.

It is also a sales chatbot.

Your chatbot can:

🎯 Collect names and emails
📧 Send notifications to your team
📅 Book appointments
👤 Escalate to a human agent
� Receive photos & documents from visitors and act on them
🔗 Trigger custom workflows including forwarding uploaded images securely

Every AI chat conversation with your chatbot becomes an opportunity.

## ⚡ Easy Setup in Minutes

You don't need technical skills to launch your chatbot.

1. Install the plugin
2. Add your API key
3. Run the setup wizard
4. Activate your chatbot

In less than 5 minutes, your AI chatbot is live and your AI chat channel is open for visitors.

## 🎨 Fully Customizable Chatbot

Match your brand perfectly.

Your chatbot supports:

🎨 Custom colors and footer
🤖 Avatars (9 included + custom upload)
� File upload button (images & PDFs) with in-chat preview
�📱 Floating widget or inline embed via shortcode
✍️ Draggable, minimizable, and closable window
📲 Fully mobile responsive design

Make your chatbot look like it was built specifically for your site.

## 💰 Control Costs & Usage

Worried about AI costs?

Your chatbot includes:

🔢 Daily usage limits (global and per-user)
🚫 Per-IP and per-user restrictions
📊 Real-time cost tracking and token usage
📝 Optional conversation logging (on/off anytime)

You stay in control while your chatbot works for you.

## 🧠 Powerful AI Behind Your Chatbot

Your chatbot can connect to:

🟢 **OpenAI** — GPT-5.5, GPT-5.5 Pro, GPT-5.4, GPT-5.4 Mini (default fast/cheap), ChatGPT `chat-latest` and all current models
🟢 **Anthropic Claude** — Sonnet 4.6 (recommended), Haiku 4.5 (fast), Opus 4.8 (premium), Fable 5 (flagship) and more
🟢 **Google Gemini** — 3.1 Flash-Lite (default fast/cheap), 3.5 Flash, 3.1 Pro, 3 Flash and more (free tier available)

You choose the AI engine for your chatbot.  
You control how your chatbot behaves.  
You decide what your chatbot knows.

Unlike SaaS platforms or using ChatGPT directly, this chatbot runs directly on your WordPress site.  
Your data stays on your server. Your brand stays front and center. Your AI chat, your rules.


## 🔐 GDPR & Privacy Friendly

This chatbot includes built-in consent tools and privacy controls.

You can enable or disable conversation logging anytime.

Your chatbot respects your users and your compliance requirements.

## ✅ Perfect For

🛒 WooCommerce stores
🏢 Agencies
🚀 SaaS businesses
🏤 Corporate websites
🔧 Service companies
✍️ Bloggers
🎓 Online educators

If you want more engagement and automation, you need a professional chatbot and a reliable AI chat solution.


## 📚 Documentation & Technical Resources

Official website:
[axiachat.org](https://axiachat.org/)

Full documentation, tutorials and advanced configuration guides:
[axiachat.org/help](https://axiachat.org/help/)

Community support forum:
[wordpress.org/support/plugin/axiachat-ai](https://wordpress.org/support/plugin/axiachat-ai/)


## 🆓 Getting Started

The free version of this chatbot is fully functional and covers most business needs.

Start for free, explore all the core features, and grow at your own pace.

## 🚀 Stop Losing Opportunities

Every visitor that leaves your site without interacting is a missed opportunity.

A smart chatbot greets them.  
A helpful chatbot answers them.  
A proactive chatbot converts them.

Install the best AI chatbot for WordPress today — your own ChatGPT working exclusively for your business — and transform your website into a 24/7 growth engine.

== Technical Features ==

= Supported AI Models =

**OpenAI (GPT)**
GPT-5.5  
GPT-5.5 Pro  
GPT-5.4  
GPT-5.4 Pro  
GPT-5.4 Mini  
GPT-5.4 Nano  
ChatGPT chat-latest  
GPT-5.3 Instant  
GPT-5.2 Instant  
GPT-5.2 Thinking  
GPT-5  
GPT-5 Mini  
GPT-5 Nano  
GPT-4.1 / 4.1 Mini / 4.1 Nano  
GPT-4o / 4o Mini  
GPT-4 Turbo  
GPT-3.5 Turbo  

**Anthropic (Claude)**
Claude Sonnet 4.6 / 4.5 (recommended for chat)  
Claude Haiku 4.5 (fast, lower cost)  
Claude Opus 4.8 (premium)  
Claude Fable 5 (flagship reasoning model)  
Claude Opus 4.7 / 4.6  
Claude Opus 4.5 / 4.1  
Claude Sonnet 4 and Claude Opus 4 — legacy (deprecated, retirement scheduled Jun 2026)  
Claude Sonnet 3.7 / Haiku 3.5 / 3 — legacy (retired)  

**Google Gemini**
Gemini 3.1 Flash-Lite (stable, default fast/cheap)  
Gemini 3.5 Flash (stable, quality-focused)  
Gemini 3.1 Pro Preview  
Gemini 3 Flash Preview — legacy (deprecated, use 3.5 Flash)  
Gemini 3.1 Flash-Lite Preview / Gemini 3 Pro Preview — legacy (shut down)  
Gemini 2.5 Pro  
Gemini 2.5 Flash  
Gemini 2.5 Flash-Lite  
Gemini 2.0 Flash / Flash-Lite — legacy (shut down Jun 2026)  

= Automation & Integrations =

* **REST API ready** — every bot interaction is driven by a WordPress AJAX endpoint, making it straightforward to integrate from external systems
* **Outbound webhook parameters** — configure method (GET/POST), headers, body template with dynamic placeholders, and response mapping

= Add-ons =

* **AI Tools** — native function-calling tools (web search, calculations, date/time, etc.)
* **File & Image Uploads** — visitors can send photos (JPG, PNG, WebP) and PDF documents directly in the chat. Images are analyzed via AI vision; PDFs have text extracted automatically. Configurable per bot with file type and size controls
* **Appointments** — let the bot schedule appointments directly from the chat
* **Lead Capture** — collect and store visitor data (name, email, phone) inside the chat flow
* **Web Scraper** — fetch and summarise live web content as part of a bot response


= RAG — Retrieval-Augmented Generation =

* Local vector search (cosine similarity)
* Pinecone support
* OpenAI embeddings
* Advanced indexing
* WooCommerce enrichment
* Featured images in chat

= Security & Validation =

* WordPress nonce
* Honeypot protection
* CAPTCHA support
* Moderation API
* Rate limiting
* Usage limits
* Hidden system prompt
* Endpoint allowlist

= Frontend & UI =

* Floating widget (configurable position: bottom-right, bottom-left, etc.) or inline layout via shortcode
* Fully draggable, minimizable and closable chat window
* Voice chat mode (`type="voice_text"`) with browser Web Speech API
* File upload button (📎) with drag-and-drop support, in-chat thumbnail preview, and admin log attachment indicators
* Automatic image optimization (resize + compress) to minimize API costs while preserving visual quality
* Markdown rendering including images, bold, lists, and code blocks
* Suggestion chips / quick-reply buttons
* WhatsApp CTA button inside the chat window (configurable per bot)

= Admin & Developer Tools =

* Guided **Easy Setup Wizard** — fully working bot in under 2 minutes
* One-click AI-generated bot instructions — describe your use case, AI writes the system prompt
* Built-in prompt templates (Customer Support, Lead Generation, E-commerce, FAQ, etc.)
* Chat conversation logs with full transcript, token usage, and cost breakdown
* Email alerts on new conversations — full transcript or summary, per-conversation or digest mode
* `[aichat id="slug"]` shortcode with 20+ data-attribute parameters (layout, position, colours, avatar, voice, maximized, etc.)


== Changelog ==
= 4.1.10 =
* Fixed: Automatic nonce recovery for frontend AJAX requests — when a cached/expired nonce triggers `403`, the widget fetches a fresh nonce and retries once.
* Improved: Added machine-readable `invalid_nonce` codes across chat, history, upload, and lead-form AJAX handlers for reliable frontend recovery.
* Improved: Cache purge hooks now cover updated/added/deleted widget-affecting options with a single-purge-per-request guard.
* Added: Anthropic Claude Fable 5 (`claude-fable-5`) in the model registry with current pricing metadata ($10 input / $50 output per 1M tokens).
* Updated: Gemini metadata refreshed against current API docs (including `gemini-flash-latest` and `gemini-3.1-pro-preview-customtools` aliases plus shut-down labels for retired Gemini 2.0/preview entries).

= 4.1.9 =
* Added: New OpenAI models for advanced usage — `gpt-5.5-pro`, `gpt-5.4-pro`, and ChatGPT rolling alias `chat-latest`.
* Updated: Model lists refreshed with current Claude/Gemini lineup, including Claude Opus 4.8 and Gemini 3.1 Flash-Lite (stable).
* Updated: Defaults optimized for chat speed/cost — OpenAI keeps `gpt-5.4-mini` and Gemini now defaults to `gemini-3.1-flash-lite`.
* Improved: Internal provider flows now resolve default models from the central registry (avoids hardcoded fallback IDs).

= 4.1.8 =
* Added: Advanced Settings diagnostic card with live sequential checks (environment, provider probe, embeddings, context retrieval, 3-turn chat, tool execution and timeout timings).
* Added: Admin AJAX diagnostic runner that uses the selected bot/provider/model configuration and returns a copyable JSON report.
* Updated: Model registry refreshed with Claude Opus 4.8 and the current Gemini 3.x lineup (Gemini 3.5 Flash, 3.1 Pro, 3 Flash, 3.1 Flash-Lite).
* Updated: Defaults tuned for fast/cheap chat usage — OpenAI keeps GPT-5.4 Mini as default, and Gemini default is now Gemini 3.1 Flash-Lite.
* Updated: Claude default strategy remains Sonnet 4.6 (best speed/quality/cost for chat); Opus 4.8 stays as optional premium model.
* Updated: OpenAI catalog synced with latest ChatGPT/API models — added GPT-5.5 Pro (`gpt-5.5-pro`), GPT-5.4 Pro (`gpt-5.4-pro`) and ChatGPT alias `chat-latest`.
* Updated: New OpenAI entries now include full pricing metadata in the central registry ($30/$180 for GPT-5.5 Pro and GPT-5.4 Pro; $5/$30 for `chat-latest`).
* Updated: Deprecated/shut-down models are now clearly marked as legacy in model lists (Claude 4 snapshots and older Gemini 3/2.0 variants).
* Fixed: Auxiliary defaults and vision routes no longer rely on retired model IDs.

= 4.1.7 =
* Updated libraries: `smalot/pdfparser` from 2.12.4 to 2.12.5 and `symfony/polyfill-mbstring` from 1.33.0 to 1.37.0.

= 4.1.6 =
* Added: OpenAI GPT-5.5 model (`gpt-5.5`) with API pricing metadata ($5 input / $30 output per 1M tokens), 1M context window, and 128K max output.
* Added: Anthropic Claude Opus 4.7 model (`claude-opus-4-7`) with API pricing metadata ($5 input / $25 output per 1M tokens), 1M context window, and 128K max output.


= 4.1.5 =
* shortcode add maximized


= 4.1.4 =
* Added: Claude Sonnet 4.6 model (`claude-sonnet-4-6`, $3/$15, 1M context, 64K output) — now the default Anthropic model.
* Updated: All model pricing verified against official provider pages (OpenAI, Anthropic, Google) as of April 2026.

= 4.1.3 =
* Compatibility: Tested with WordPress 7.0 RC

= 4.1.2 =
💰 **Budget Limits & Usage Dashboard**
* Added: Budget limits — set daily/monthly caps on token usage and dollar spend for your AI chatbot from Settings → Usage & Moderation. When exceeded, the chatbot widget hides completely or falls back to showing only the WhatsApp CTA button.
* Added: Server-side pre-render check — budget limits are evaluated at page load so new visitors never see the AI chat widget when the budget is already exhausted. Admins always see the widget for testing.
* Added: Monthly usage summary in the Usage dashboard — select any month to view total input/output/combined tokens, estimated cost, conversation count, and a per-model breakdown table.
* Improved: "When limit is reached" behavior for budget limits now supports two modes: hide chatbot entirely, or show WhatsApp button only (requires WhatsApp CTA configured in bot settings).

= 4.1.1 =
* Added: OpenAI GPT-5.4 family — `gpt-5.4` (1M context, $2.50/$15), `gpt-5.4-mini` (400K, $0.75/$4.50), and `gpt-5.4-nano` (400K, $0.20/$1.25). GPT-5.4 is now the default model for new bots.
* Added: Google Gemini 3.1 models — `gemini-3.1-pro-preview` ($2/$12) and `gemini-3.1-flash-lite-preview` ($0.25/$1.50).
* Updated: Gemini model pricing aligned with current Google API rates (2.5 Pro, 2.5 Flash, 2.5 Flash-Lite, 3 Flash).
* Updated: Gemini 3 Pro Preview marked as shut down (deprecated Mar 9 2026) — use Gemini 3.1 Pro Preview.
* Updated: Gemini 2.0 Flash / Flash-Lite marked as legacy (deprecated Jun 2026).

= 3.1.7 =
* Changed: Footer attribution is now opt-in for all users (default off). Site administrators can enable it from Settings → Add-ons or during the Easy Setup Wizard.
* Improved: External Services documentation updated — added Google Gemini and Freemius SDK disclosures.


= 3.1.5 =
🎯 **Lead Capture — Major Overhaul**
* Added: Inline lead forms (`show_form`) — the bot displays a styled form directly inside the chat widget. Visitors fill it out and submit without leaving the conversation.
* Added: Multiple Lead Lists — create independent lists, each with its own fields, destination, form design, bot assignment, and notifications.
* Added: Form Appearance customization per list — display mode (full/compact), custom HTML header, submit button text, success message, background color, and button color.
* Added: Live form preview panel in admin — see real-time changes to form appearance, fields, types, and required markers as you edit.
* Added: Custom field types — Text, Email, Phone, Textarea, Number, and URL with proper validation and mobile keyboard support.
* Added: Required field support — mark fields as mandatory with red asterisk indicator and client-side validation.
* Added: Bot assignment per list — assign a list to all bots or restrict it to a specific bot for multi-bot setups.
* Added: List name column in leads table and list filter for multi-list management.
* Added: Total leads footer row in lists table with global count.
* Improved: `show_form` is now the primary recommended capture method; `save_lead` (conversational) remains available as fallback for non-visual channels (WhatsApp, SMS).
* Improved: Chat input is temporarily disabled while the inline form is visible to focus visitor attention.
* Improved: Form submit shows a customizable success message with green checkmark, then conversation resumes normally.
* Fixed: Lead list filter and per-list count now work correctly (list_id properly stored on capture).


= 3.1.0 =
* Added: Quick Questions — predefined question buttons displayed above the chat input to guide visitors and boost engagement from the first interaction.
* Added: Per-bot Quick Questions configuration — enable/disable and manage questions from Bots → Extras with dynamic add/remove fields and auto-save.

= 3.0.9 =
* Added: File & Image Uploads — visitors can now send photos (JPG, PNG, WebP) and PDF documents directly in the chat widget via a new 📎 attachment button.
* Added: AI Vision support — uploaded images are sent to the AI model's vision capability (GPT-4o, Claude Sonnet/Opus, Gemini Pro/Flash) for real-time visual analysis.
* Added: PDF text extraction — uploaded PDFs have their text extracted automatically and injected into the conversation context.
* Added: Automatic image optimization — uploaded images are resized (max 1536px) and compressed to reduce API costs and speed up processing.
* Added: In-chat file preview — sent messages show a thumbnail (images) or file indicator (PDFs) attached to the user's message bubble.
* Added: Admin log file indicators — conversation log list shows 📎 icon for sessions with attachments; detail view shows clickable thumbnails with secure full-size preview (base64 data URI, no public file exposure).
* Added: Per-bot upload configuration — enable/disable uploads, select allowed file types (PDF, JPG, PNG, WebP), and set max file size (1–20 MB) independently for each bot.
* Security: Uploaded files are never exposed via public URLs — images are stored as base64 in the database, accessible only to authenticated administrators.


= 3.0.8 =
* Added: OpenAI GPT-5.3 model support (`gpt-5.3-chat-latest`) — now the default model for new bots.
* Improved: Full page-cache compatibility — automatic cache purge when bot settings change, supporting WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache, SiteGround Optimizer, WP Fastest Cache, WP-Optimize, Cache Enabler, Hummingbird, Breeze (Cloudways), Kinsta, Cloudflare Super Page Cache, Autoptimize, and Nginx Helper. Third-party plugins can hook into `aichat_after_purge_cache`.
* Added: View and Edit buttons for indexed documents in Training → Context — inspect individual chunks, spot indexing errors, and surgically edit specific chunks with automatic re-embedding on save.

= 3.0.7 =
* Added: GDPR Consent now supports two modes — classic accept button or an email form gate that captures visitor contact details before the chat starts.
* Added: Email form mode collects email (required), name, and phone (both optional toggles with configurable placeholders).
* Added: GDPR Contacts tab under Leads — view, search, delete, bulk-delete, and export contacts captured via the email form. No plan limits apply.
* Added: "Delete all plugin data on uninstall" option in Settings → Advanced — when enabled, uninstalling the plugin removes all database tables and settings; disabled by default to prevent accidental data loss.


= 3.0.5 =
* Added: WhatsApp CTA button — optionally show a WhatsApp contact button inside the chat window, configurable per bot (phone number, custom message, button label, and display position).
* Added: Automatic front-end translation 

= 3.0.4 =
* Changed: Google Gemini is now the default and first provider in the Easy Config wizard — free tier covers ~100 messages/day.
* Added: "How to get a free API key" tip banner below provider cards in Easy Config (step 3) with step-by-step modal guide.
* Added: Same free API key tip banner on the Settings → General page when no API keys are configured.
* Improved: Provider card order updated across the plugin: Google Gemini → OpenAI → Anthropic.

= 3.0.3 =
* Added: Email alerts for new conversations — receive an email each time a user finishes chatting with your bot (enabled by default, configurable under Settings → General).
* Added: Advanced email alert options modal — choose between full transcript or summary-only emails, per-conversation or digest mode, and configurable idle timeout.

= 3.0.2 =
* Fixed: Tool continuation no longer triggers embedding generation (prevented 400 errors with Gemini provider).
* Fixed: Tool execution continuation now works reliably for Gemini and Claude providers (silent death resolved).
* Fixed: Suggestions chips now render correctly after tool continuation responses.
* Fixed: GPT-5.x hallucinated tool narration (e.g. "(executing tools…)") is detected and retried automatically.

= 3.0.1 =
🎨 **Redesign & User-Friendly Overhaul**
* Redesigned: Brand-new Easy Config wizard — set up a fully working bot in under 2 minutes with a guided, step-by-step flow.
* Redesigned: Training → Instructions now uses a clean card-based layout with built-in universal guidelines and a "Quick mode / Full editor" toggle.
* Redesigned: Training → Context page rebuilt with a modern batch-processing UI, real-time progress, and clearer status indicators.
* Redesigned: Bot Settings reorganized into logical tabs (General, Appearance, Window, Advanced) with live preview and simplified controls.
* Added: One-click AI-generated bot instructions — describe what you need and the AI writes the full system prompt for you.
* Added: Built-in prompt templates (Customer Support, Lead Generation, E-commerce Assistant, etc.) selectable from the Instructions page.
* Improved: AI Tools settings simplified — per-tool System Policy removed; all bot behavior is now centralized in Training → Instructions with clear usage tips and examples.
* Improved: Full JavaScript internationalization audit — all admin UI strings are now translatable.

= 2.0.9 =
* Added: Advanced Indexing Options per context — configure which fields are embedded (excerpt, URL, featured image, taxonomies, custom meta keys).
* Added: WooCommerce static fields in indexing — short description and attributes can now be included in embeddings.
* Added: WooCommerce dynamic enrichment — price, stock status and SKU are injected at query time with fresh data (no re-indexing needed when prices change).
* Added: Featured image URL option — when enabled, the AI can show product/post images directly in the chat using Markdown.
* Added: Image rendering support in chat widget — bot responses can now display images via Markdown syntax.
* Added: Post URL included by default in embeddings — the AI can now reference direct links to content. Configurable in Advanced Indexing Options.
* Fixed: Pinecone upsert metadata now includes content and post type — fixes empty context and enables WooCommerce enrichment for Pinecone-based contexts.
* Improved: Markdown-to-HTML fallback now supports image syntax `![alt](url)`.

= 2.0.8 =
* Added: Knowledge Sources Limit setting (3–10 slider) in Thresholds — control how many RAG chunks are included in each AI response (default 5).
* Added: History Persistence toggle per bot — when OFF, chat history is not restored on page refresh.
* Improved: Context Max Length default raised from 4096 to 6000 characters to avoid truncating rich RAG contexts.


= 2.0.7 =
* Contexts can now be modified.
* Preview page to test the bot before deploying it globally.
* Button in the widget to clear conversation history.

= 2.0.6 =
🛡️ **CSS Isolation – Theme-Proof Styling**
* Fixed: Chat widget text and background colors are now hardened with `!important` declarations to prevent WordPress themes from overriding them.
* Fixed: Dark themes can no longer cause invisible text (white-on-white) inside chat bubbles.
* Hardened: All critical UI elements protected — message bubbles, input field, send button, header, suggestions chips, GDPR consent block, footer, and super-minimized avatar.

🔧 **Diagnostics ZIP Export**
* Added: One-click "Export Diagnostics ZIP" button in Settings → Advanced tab for faster remote support.
* Includes: Full environment report (WP/PHP/MySQL versions, active theme, active plugins, bot & context summaries) plus plugin log files. Never includes API keys or secrets.

= 2.0.2 =
**Major Release: Business Automation Suite**

🎯 **Lead Capture System**

📅 **Appointment Booking System**


== Bundled Libraries ==
* Bootstrap (local)
* Bootstrap Icons (local)
* smalot/pdfparser (LGPLv3) for PDF extraction


== External Services / Data Disclosure ==
This plugin can connect to the following third‑party APIs depending on which features you enable. You (the site owner) must supply the API keys. No keys are bundled and no traffic is proxied through a vendor server controlled by this plugin author.

=== 1. OpenAI ===
Used for: chat completions / responses, embeddings (context indexing), moderation (safety checks).

Endpoints used (HTTPS):
* https://api.openai.com/v1/chat/completions (legacy Chat Completions)
* https://api.openai.com/v1/responses (Responses API – new unified endpoint if configured)
* https://api.openai.com/v1/embeddings (document/post/PDF embedding + wizard indexing)
* https://api.openai.com/v1/moderations (content moderation)

Data Sent:
* User prompt text (per message) and limited conversation history (trimmed for token control)
* System / policy instructions (security + privacy policy + bot instructions)
* Optional retrieved context snippets (only the selected top‑N chunks or page excerpt – never the full original document)
* Embedding requests: raw chunk text produced from your site’s content or uploaded PDFs
* Moderation: only the user prompt text (not the entire history)

Data Retention (Your Server):
* Conversation log rows (if logging enabled) including user prompt, model reply, timestamps, bot slug, session id, optional user id. IP (binary) only stored when per‑IP limits are turned on. Disable logging to stop storing new rows.
* Embeddings table stores numeric vectors generated from your content (not reversible plaintext) plus the original chunk text for retrieval.

Recommendations:
* Update your privacy policy to disclose sending user prompts and limited site content to OpenAI for processing.
* Disable logging or periodically purge if you process personal data.

Legal / Docs:
* Terms: https://openai.com/policies/terms-of-use
* Privacy: https://openai.com/policies/privacy-policy
* Usage Policies: https://openai.com/policies/usage-policies

Opt‑Out / Control:
* Remove the OpenAI API key in Settings to stop all OpenAI calls (bots will refuse to answer).
* Disable conversation logging.
* Limit context ingestion to non‑sensitive pages.

=== 2. Anthropic (Claude) ===
Used for: alternative chat completions via Claude models (messages API) when a bot provider is set to Anthropic/Claude.

Endpoint used (HTTPS):
* https://api.anthropic.com/v1/messages

Data Sent:
* A rewritten message array: system instructions + user prompt + condensed prior turns (trimmed) + optional retrieved context snippets.
* Model identifier, max tokens / temperature style parameters.

Headers:
* `x-api-key` (your key) and `anthropic-version` (currently 2023-06-01 set in code).

Retention (Your Server):
* Same as OpenAI notes for conversation logging (the provider choice does not change local storage schema).

Legal / Docs:
* Terms: https://www.anthropic.com/legal/terms-of-service
* Privacy: https://www.anthropic.com/legal/privacy
* Usage Policy: https://www.anthropic.com/legal/aup

Opt‑Out / Control:
* Leave the Claude API key blank; those bots will fallback/refuse if provider requires it.
* Switch provider per bot back to OpenAI.

=== 3. Pinecone (Optional Remote Vector Store) ===
Only used if you explicitly create a Context with remote type "Pinecone". Local context mode (default) never contacts Pinecone.

Endpoint Pattern:
* Region/index specific HTTPS endpoints you enter (example placeholder: https://controller.pinecone.io and index query/upsert endpoints under *.pinecone.io). The plugin validates host against an allowlist containing pinecone.io (filter extendable).

Used For:
* Upserting embeddings (during context indexing / syncing)
* Querying similar vectors when answering a question in that context.

Data Sent:
* Vectors (embedding arrays) and associated metadata (post/page IDs, titles, short chunk text) for upsert.
* Query: the embedding vector of the user question + top‑K request.

Retention:
* Stored inside your Pinecone project (not on this plugin server). Local DB still keeps minimal reference metadata if you mix modes.

Legal / Docs:
* Terms: https://www.pinecone.io/terms/
* Privacy: https://www.pinecone.io/privacy/
* Security: https://www.pinecone.io/security/

Opt‑Out / Control:
* Do not configure a remote Pinecone context; use local mode or page mode instead.
* Delete the remote context to stop future upserts/queries.

=== 4. Google Gemini (Optional AI Provider) ===
Used for: alternative chat completions via Google Gemini models when a bot provider is set to Google/Gemini.

Endpoint used (HTTPS):
* https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent

Data Sent:
* System instructions + user prompt + condensed prior turns (trimmed) + optional retrieved context snippets.
* Model identifier and generation configuration parameters.

Headers:
* API key passed as URL parameter (`key=`).

Retention (Your Server):
* Same as OpenAI notes for conversation logging.

Legal / Docs:
* Terms: https://ai.google.dev/gemini-api/terms
* Privacy: https://policies.google.com/privacy
* Usage Policy: https://ai.google.dev/gemini-api/terms

Opt‑Out / Control:
* Leave the Gemini API key blank; those bots will fallback/refuse if provider requires it.
* Switch provider per bot to OpenAI or Claude.

=== 5. Freemius SDK (Licensing & Analytics) ===
This plugin uses the Freemius SDK for license activation, update delivery, and anonymous usage analytics (opt-in).

Endpoints used (HTTPS):
* https://api.freemius.com (license checks, updates, analytics)

Data Sent (if opted in):
* Site URL, WordPress version, PHP version, plugin version, and admin email.
* No visitor/chat data is ever sent to Freemius.

Legal / Docs:
* Terms: https://freemius.com/terms/
* Privacy: https://freemius.com/privacy/

Opt‑Out / Control:
* During activation, choose "Skip" to opt out of anonymous analytics.
* License-related API calls are required only for premium features.

=== 6. Google Sheets (Optional Lead Export) ===
Only used if you enable the Google Sheets lead destination in the Leads add‑on. The plugin connects to Google APIs via OAuth 2.0 so the site administrator can export captured lead data (name, email, phone, custom fields) to a chosen spreadsheet.

Endpoints used (HTTPS):
* https://accounts.google.com/o/oauth2/v2/auth (OAuth authorization)
* https://oauth2.googleapis.com/token (token exchange & refresh)
* https://www.googleapis.com/oauth2/v2/userinfo (fetch connected account email)
* https://sheets.googleapis.com/v4/spreadsheets/{id} (verify spreadsheet access)
* https://sheets.googleapis.com/v4/spreadsheets/{id}/values/{range}:append (append lead row)
* https://sheets.googleapis.com/v4/spreadsheets/{id}/values/{range} (read/write header row)

Data Sent:
* OAuth flow: authorization code, client credentials, and redirect URI to obtain access & refresh tokens.
* Lead export: one row per captured lead containing the fields the visitor provided (e.g. name, email, phone) plus a timestamp.
* Connected account email is fetched once to display which Google account is linked.

Data Retention:
* Access and refresh tokens are stored encrypted (AES‑256‑CBC) in your WordPress database. Lead data lives in your Google Spreadsheet under your own Google account.

Legal / Docs:
* Terms: https://policies.google.com/terms
* Privacy: https://policies.google.com/privacy
* Google APIs Terms of Service: https://developers.google.com/terms

Opt‑Out / Control:
* Do not enable the Google Sheets destination in Leads settings — no Google traffic will occur.
* Disconnect your Google account from the Leads → Settings tab to revoke stored tokens.

=== 7. Google Calendar (Optional Appointment Sync) ===
Only used if you enable the Google Calendar adapter in the Appointments add‑on. The plugin connects to Google Calendar API via OAuth 2.0 so the site administrator can sync bookings made through the AI chat with a Google Calendar.

Endpoints used (HTTPS):
* https://accounts.google.com/o/oauth2/v2/auth (OAuth authorization)
* https://oauth2.googleapis.com/token (token exchange & refresh)
* https://oauth2.googleapis.com/revoke (token revocation on disconnect)
* https://www.googleapis.com/oauth2/v2/userinfo (fetch connected account email)
* https://www.googleapis.com/calendar/v3/users/me/calendarList (list available calendars)
* https://www.googleapis.com/calendar/v3/calendars/{id}/events (create, read, update, delete events)

Data Sent:
* OAuth flow: authorization code, client credentials, and redirect URI to obtain access & refresh tokens.
* Event creation: customer name, email, phone, service name, date/time, timezone, optional notes, and a booking code stored as a private extended property.
* Event queries: date range and timezone to check calendar availability before booking.

Data Retention:
* Access and refresh tokens are stored encrypted (AES‑256‑CBC) in your WordPress database. Calendar events live in the administrator’s own Google Calendar account.

Legal / Docs:
* Terms: https://policies.google.com/terms
* Privacy: https://policies.google.com/privacy
* Google APIs Terms of Service: https://developers.google.com/terms

Opt‑Out / Control:
* Do not enable the Google Calendar adapter in Appointments settings — no Google traffic will occur.
* Disconnect your Google account from the Appointments → Settings tab to revoke stored tokens.

=== 8. Embedded Loader (Your Site's Frontend) ===
The public embed script served from your own domain loads the chat UI. It calls only your WordPress `admin-ajax.php` endpoint (dynamic URL) – no third‑party directly from the browser.
Data Flow (Browser → Your Server → Provider):


== FAQ ==

**Q: Why choose AxiaChat AI over other WordPress chatbot plugins?**
A: AxiaChat AI gives you complete control with support for multiple AI providers (OpenAI, Claude, Gemini), advanced RAG capabilities, MCP server integration, and enterprise features—all while keeping your data on your server. Think of it as your own private ChatGPT, trained on your content, embedded in your site, with no monthly SaaS fees beyond your chosen AI provider's API costs.

**Q: Do I need an OpenAI API key?**
A: You need at least one AI provider API key (OpenAI, Claude, or Gemini). OpenAI is recommended for getting started. All keys are yours—we never charge markup or routing fees.

**Q: How much does it cost to run?**
A: The plugin is free. You only pay your AI provider's API usage (typically $0.001-0.01 per conversation). Usage limits help you control costs. A typical e-commerce site handles hundreds of conversations for under $10/month.

**Q: Can the chatbot learn from my website content?**
A: Yes! The Easy Config Wizard automatically scans and indexes your site content. You can also upload PDFs, select specific pages, or train it on your knowledge base. The chatbot uses Retrieval Augmented Generation (RAG) to provide accurate, contextual answers.

**Q: Will this work with my WooCommerce store?**
A: Absolutely. The wizard auto-detects WooCommerce and indexes your products. The chatbot can answer product questions, help with comparisons, and guide customers through your catalog.

**Q: How do I control API costs?**
A: Set daily usage limits (per-user, per-IP, or global). Choose what happens when limits are reached: disable input or hide the widget. Monitor usage in real-time via the built-in logs and cost tracking.

**Q: Is chat conversation data stored? Can I disable logging?**
A: Chat conversation logging is optional and fully controllable. Toggle it ON to review interactions and improve your bot, or OFF for maximum privacy. When enabled, data stays on YOUR server—never sent to us.

**Q: How is GDPR compliance handled?**
A: Built-in GDPR consent management with an in-stream consent bubble that blocks chat input until accepted. IP addresses are only stored if usage limits are enabled. You maintain full data control and can delete logs anytime.

**Q: What is MCP Server Integration?**
A: Model Context Protocol (MCP) lets your bot connect to external tools, databases, and APIs. Extend functionality beyond Q&A: fetch live data, integrate with your CRM, query inventory systems, and more—all without custom coding.

**Q: Does it support web search?**
A: Yes! Enable provider-native web search so your bot can access current information from the internet. Works with OpenAI GPT-5*, Claude 4.x, and Gemini. Optional domain allowlists let you restrict sources to trusted sites only.

**Q: Can I customize the appearance?**
A: Complete customization: colors, avatars (9 included + custom upload), position, size, window controls (draggable, minimizable, closable), button labels, and more. Match your brand perfectly.

**Q: Where can I deploy the chatbot?**
A: Two ways: (1) Floating global widget visible across your entire site, or (2) inline embedding via shortcode on specific pages/posts. Mix and match different bots for different pages.

**Q: What languages are supported?**
A: The AI models support 100+ languages naturally. The plugin UI is translation-ready (Spanish included) and works with RTL languages. Customize all bot responses for any language.

**Q: Can visitors send images or documents in the chat?**
A: Yes! When file uploads are enabled on a bot, visitors see a 📎 button to attach photos (JPG, PNG, WebP) or PDF documents. Images are analyzed by the AI using vision capabilities — the model literally sees the photo. PDFs have their text extracted and analyzed in context. Great for getting quotes from photos, reviewing contracts, diagnosing issues from screenshots, and much more.

**Q: Can the AI forward uploaded images to external systems?**
A: Yes. Uploaded images are stored securely as base64 (never exposed via public URLs). When the AI calls a Custom Webhook or MCP Server tool, it can include the image data as a parameter — making it available to automation platforms like n8n, Zapier, or Make for further processing. Your visitors' private files are never publicly accessible.

**Q: Can visitors use voice input?**
A: Yes, voice chat input is supported for compatible chatbots. Users can speak their questions instead of typing.

**Q: Will more AI providers be added?**
A: Yes! Azure OpenAI, additional models, and more providers are on the roadmap. The plugin's extensible architecture makes adding new providers straightforward.

**Q: What if I need a custom capability not listed?**
A: We can build custom capabilities tailored to your business needs. Custom development is available under a project quote. [Contact us for a quote →](https://axiachat.org/)

**Q: Are there paid plans? What do they include?**
A: Yes! AxiaChat AI offers a generous free version with core features. Premium plans unlock additional capabilities. Visit [axiachat.org](https://axiachat.org/) to learn more.

**Q: Is support available?**
A: Free users can get community help via the WordPress.org support forum. Priority support with faster response times is available for paid plan subscribers. Visit [axiachat.org](https://axiachat.org/) for support options. When reporting issues, please include your WP version, PHP version, and logging status. You can also export a diagnostics ZIP from the plugin's Advanced settings to speed up troubleshooting.

== Screenshots ==
1. **Bot Configuration** – Set the AI model, behavior, tone, and appearance for each chatbot independently
2. **Training Context** – Index your WordPress content, WooCommerce products, and PDFs for accurate RAG responses
3. **Training Instructions** – Write or AI-generate the bot’s personality and system prompt with one click
4. **Easy Setup Wizard** – Launch a fully working AI chatbot in under 2 minutes with a guided step-by-step flow
5. **Lead Capture Dashboard** – View, filter, and export leads collected automatically by the chatbot during conversations
6. **Usage & Cost Tracking** – Monitor token consumption, API cost per conversation, and daily usage in real time
7. **Appointment Management** – Review and manage AI-scheduled appointments directly from the WordPress admin panel


== Support ==
Use the WordPress.org support forum. Provide WP version, PHP version, logging status, and reproduction steps.

== Contributing ==
Feature suggestions and PRs welcome. Follow WP coding standards and supply clear commit messages.

== License ==
GPLv2 or later. See LICENSE.

== Disclaimer ==
AI output may be inaccurate. Do not rely on responses for legal, medical or financial decisions without human review.