=== BitBot - AI Chat, Voice Calls, WhatsApp, Forms & Leads ===
Contributors: youamibot
Donate link: https://youami.ai
Tags: chatbot, ai, voice, whatsapp, lead generation
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 2.2.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Visitors ask by text or voice, get answers from your own pages, and leave their details. Free to start, set up in two minutes.

== Description ==

**Your site, answering questions day and night.** BitBot reads your public pages and answers visitors from them, with a link to the page it used. When someone wants a person, it collects their name and email, or hands them to your WhatsApp.

No API keys, no separate dashboard. Install, activate, and the chat is live. Everything is managed inside WordPress.

= Talk, not just type =

* **Voice calls from the widget.** A visitor taps Call and talks to your site. Pick the voice that suits your brand. Assistant and Agent plans.
* **WhatsApp button.** Add your number and visitors can carry on the conversation with you in WhatsApp, on any plan.
* **Chat in their language.** Offer the languages you serve. BitBot replies in the visitor's language and you edit the welcome copy for each one.

= Never lose an enquiry =

* **Ask for details before the first reply.** Turn on the pre-chat form and every chat starts with a name and an email.
* **Forms on your pages.** Build a form in minutes, or let BitBot draft one for you, and embed it anywhere with a shortcode.
* **One inbox.** Every lead, with what they asked, lands in BitBot inside WordPress.
* **Follow up faster.** BitBot researches the lead and drafts the reply for you.

= Keep your content working =

* **Always in sync.** Publish or edit a page and BitBot learns it.
* **See what visitors ask that you have not written.** Coverage gaps and topic ideas, straight from real questions.
* **Draft posts from a topic, a link or a document.** Review text, images and SEO details, then publish.

= Agent: let it run the site =

* **Create and edit.** New pages and homepages from your own theme, and changes to any post or page, by asking for them.
* **Design and SEO.** The look, the CSS, titles, descriptions, broken links and site audits, with the fixes applied.
* **Run it.** Posts written and published, recurring jobs on a schedule, WooCommerce, Search Console, Zoho and Pipedrive used on your behalf.

= Plans =

**Free.** Text chat, your newest conversation in full, every lead with their message, two forms, three topic searches, one site scan, and the WhatsApp button.

**Assistant, $20 USD a month.** Everything in Free, plus voice calls, every transcript, form answers, lead research and follow-up drafts, post generation, AI-built forms, lead emails.

**Agent, $49 USD a month.** Everything in Assistant, plus your own website manager: an agent that looks after your site, builds pages or a whole site from scratch, uses your connected business tools and runs the recurring work on a schedule.

== Installation ==

1. Plugins, Add New, search for BitBot, install and activate.
2. Open BitBot in your WordPress menu. Your site registers itself and starts reading your pages.
3. The chat widget is live on your site. Watch the sync finish, then ask it something.

== Frequently Asked Questions ==

= Do I need an AI account or API key? =

No. Everything runs through the youami.ai service and is included in your plan.

= Can visitors call my site? =

Yes, on Assistant and Agent. Turn on calls in BitBot, pick a voice, and a Call button appears in the widget.

= How does the WhatsApp button work? =

Add your WhatsApp number in BitBot and a WhatsApp button appears in the widget. Tapping it opens a chat with you in WhatsApp. No WhatsApp account connection is needed, and it works on every plan.

= What does Free include? =

Text chat, your newest conversation in full, every captured lead with their message, two forms, three topic searches and one site scan. Transcripts, form answers, research and follow-ups are on Assistant.

= Does it speak other languages? =

Yes. Offer the languages you serve and BitBot replies in the visitor's language. You can edit the welcome copy for each one.

= Will it work with WooCommerce? =

Yes. BitBot answers from your product pages on every plan. Agent adds live product cards, checkout links and verified order answers in the chat.

= Will it slow my site down? =

No. The widget loads after your page, and the thinking happens on our service.

= Can BitBot get things wrong? =

Yes, like any AI. It answers from your pages and tells visitors when it does not know. Review generated posts and agent changes before you rely on them.

= Where is my data? =

Processed by the youami.ai service to provide the features you use. See https://youami.ai/privacy, or email support@youami.ai to delete it.

= Can I cancel? =

Yes, inside WordPress, any time. Your plan stays active until the end of the billing period.

== Screenshots ==

1. Your chat answers right away, with a Call button for voice and a WhatsApp button to continue with you.
2. Ask for a name and email before the first reply, so every chat starts with a lead.
3. Every conversation in one place, with a flag next to each visitor and the transcript beside it.
4. Open a lead and BitBot researches who they are and suggests the next step.
5. Visitors browse product cards from your store without leaving the chat.
6. What visitors ask, which pages answered, and what your site still needs to cover.
7. Turn the pre-chat form on in one switch and see exactly what visitors will see.
8. Offer the chat in the languages you serve, with the welcome copy for each.
9. Build a form in minutes and embed it anywhere with a shortcode.

== Changelog ==

= 2.2.4 =

* Voice calls answer sooner, and a short thinking sound fills any pause instead of silence.
* The voice welcome speaks in the chosen voice's own gender in every language.
* Sync content reads your pages from inside WordPress, shows each stage of the sync, and can be stopped.
* Chat finds the right page on large sites through page summaries.
* Conversation transcripts show formatting instead of raw markdown.
* Voice languages save exactly as the picker shows them.

= 2.2.3 =

* The settings page loads on hosts where the WordPress REST API is reached through ?rest_route= instead of /wp-json/.
* The chat widget opens in your site's language, with its title, welcome and input hint built in for 35 languages, and lays itself out right-to-left for Arabic, Persian, Hebrew and Urdu.
* Adding a widget language works on the Free plan.

= 2.2.2 =

* Voice calls connect faster: the widget starts the call directly, and a call that was started but never joined no longer blocks the line.
* A quiet call shows a countdown from 30 seconds and ends at 60, and ends on its own after a goodbye or a "thank you".

= 2.2.1 =

* Invitation bubble: shows after the delay you set, slides in beside the chat button and gives it a short buzz. Pill style, no close button, fades out on its own.
* WhatsApp: the opening message shows your site name correctly.
* Agent: numbered lists render properly, replies format as they stream, and a reply no longer disappears while the agent is working.

= 2.2.0 =

* Voice calls on paid plans. Pick a voice and visitors can call your site from the widget.
* WhatsApp button in the widget.
* Pre-chat form: ask for a name and email before the first reply, with a live preview in the settings.
* Every lead and your latest conversation on Free. Transcripts and follow-up tools on Assistant.
* Country flags on conversations, one cleaner conversation view, and badges only when a thread needs you.
* Forms: every submission is kept and emailed, repeat enquiries are never lost, closed forms stay closed.
* Agent: site editing, scheduled work, site audits, support inbox, usage credits and top-ups.
* Many fixes and speed improvements.

= 2.1.0 =
*Release Date - 21 June 2026*

* Multilingual chat: your bot now understands and replies to visitors in many more languages, not just your site's main one. Plus knowledge base improvements (filter pages by source, live sync progress) and reliability fixes.

= 2.0.3 =
*Release Date - 18 June 2026*

* Reliability and performance improvements for content sync, plus minor fixes.

= 2.0.2 =
*Release Date - 18 June 2026*

* Performance improvements for large page libraries, plus minor fixes.

= 2.0.1 =
*Release Date - 18 June 2026*

* Minor UI polish and small fixes.

= 2.0.0 =
*Release Date - 17 June 2026*

Major release — BitBot grows from a chatbot into a full AI assistant for your site.

* New: AI Agent (Pro+) — the chatbot uses your connected tools to act, not just answer.
* New: Integrations — connect WooCommerce, Zoho CRM, Pipedrive, and Google Search Console.
* New: Insights — Top Questions, Coverage Gaps, and high-intent visitors who didn't leave an email, on the Overview tab.
* New: Leads inbox upgrades — one-click CRM sync with live pipeline status, AI lead research, AI-drafted follow-up emails, and bulk select / mark-read / delete.
* Improved: Multi-language answers across 100+ languages, with sharper context understanding on Pro+.
* Improved: Rebuilt admin dashboard — faster and cleaner across every tab.

= 1.8.3 =
*Release Date - 14 May 2026*

* Fix: Content indexing edge case handled — more of your site's pages now make it into the chatbot index.
* Fix: Mobile view improved.

= 1.8.2 =
*Release Date - 12 May 2026*

* Fix: WooCommerce products and other custom post types now sync into the chatbot index.
* Fix: Chat widget mounts inside a Shadow DOM so theme button/SVG styles no longer distort it.

= 1.8.1 =
*Release Date - 8 May 2026*

* Add: Inline post-cap notice — Free-tier post limit now surfaces as a yellow WordPress admin notice with an inline Upgrade button, replacing the previous browser alert dialog.
* Add: Lead-capture honesty — when a Free-tier site is at the 10-lead cap, the chatbot now tells the visitor "we're at capacity, please email us directly" instead of falsely confirming capture.
* Add: Reactivate Subscription button on the dashboard for cancelled plans inside the billing period.
* Fix: Widget now surfaces the backend's specific error message (cap reached, plan required, etc.) instead of a generic "I encountered an error" toast.
* Fix: Leads / Drafts / Conversations admin pages were silently capped at 1,000 rows — now properly paginated with Prev / Next controls. Older records are no longer hidden.
* Fix: Pro → Pro+ subscription swap occasionally reverted to Pro because the Stripe webhook read tier from lagging metadata. Now resolves tier from the active price ID — swap completes immediately.
* Fix: Product-card rendering — `searchProducts` honours the `onSale`, `minPrice`, `maxPrice`, and `orderBy` filters that were previously declared but ignored. "What's on sale?" now returns every on-sale product, not a text-match clip.
* Fix: Multilingual chat no longer appends an English meta-narration after a localised reply. Hindi visitor → Hindi reply, full stop.
* Fix: Agent re-fetches product results on every product-asking turn, even if it called the same tool last turn — cards stay attached to the message that triggered them, not orphaned above on a previous turn.
* Fix: OTP retry behaviour — typing the wrong code no longer auto-resends a fresh OTP. The original code stays valid; the visitor just retypes.
* Fix: Filtered Leads inbox no longer shows "No leads yet" when the filter excludes everything — now says "No leads match this filter" with a clear-filters link.
* Fix: Admin assets (`admin.js`, `admin.css`) now include a filemtime cache-bust so in-place plugin updates reach the admin's browser without manual hard-reload.
* Update: `searchProducts` payload is slimmed via WC `_fields` — page-load on a 7-product sale sweep dropped from ~100 KB to ~3.5 KB on the wire.

= 1.8.0 =
* Add: Widget collision auto-stack — detects WhatsApp, accessibility menus and other floating buttons, lifts above them so the chat icon is always tappable.
* Add: Live Chats inbox now uses a 4-step display label (lead name → verified email → "Visitor from City, Country" → anonymous handle) instead of raw IPv6 addresses.
* Update: Multi-tool turns now run in parallel — chat responses for product browse + RAG fan out together instead of serially.
* Update: WooCommerce skill teaches the agent to tree-walk product categories when a plural noun ("hoodies") doesn't text-match a single SKU.

= 1.7.0 =
* Add: Pro+ tier ($49/mo) — the chatbot becomes an agent. Skills: product recommendations, draft orders, order enquiries, and live handover.
* Add: Live Chats admin dashboard with PRESENT / IDLE / LEFT presence pills and a Take Over button.
* Add: Visual product cards in chat (image, price, sale strikethrough, View → CTA).
* Add: Cross-turn memory — tool results persist across turns; agent never asks "which product did you mean?" twice.
* Update: Activation defers outbound API calls to background cron so slow hosts can never brick mid-activation.
* Update: First-sync safety net — hourly retry until content lands.
* Add: Fair-use bars on the Pro / Pro+ Dashboard for chat / posts / leads.

= 1.6.2 =
* Fix: "Powered by BitBot" widget footer and "Draft by BitBot" post footer are now dofollow links (were nofollow by mistake in 1.6.0–1.6.1).

= 1.6.1 =
* Fix: Dashboard subscription card showed "$10/month" — corrected to Free / Pro at $20/mo.
* Fix: Removed stale "first month free trial" wording.

= 1.6.0 =
* Update: Free plan is now free forever — no expiring trial.
* Add: Free includes 100 chat messages/month, 3 AI posts/month, 1 form, 10 stored leads, multilingual chatbot, full content indexing.
* Add: Pro at $20/mo unlocks unlimited chat / posts / forms / leads, AI Lead Research, drafted follow-up emails, email notifications, Topic Discovery, Style Analysis, AI form generation, removes branding.
* Add: Usage banner on the Dashboard.
* Fix: "Settings saved" notice now appears.
* Fix: Chat no longer resets on cross-page navigation in the same tab.

= 1.5.2 =
* Add: Lead notification emails — get pinged the moment a visitor turns into a lead.
* Add: Notification email setting in BitBot → Settings.
* Add: Menu badge for unviewed leads (drops as you open each lead).
* Fix: 500 error when saving posts in the block editor — REST save no longer blocks on background sync.

= 1.5.0 =
* Add: Chat-to-Lead capture — chatbot detects emails in conversation and creates leads automatically.
* Add: View Conversation on lead detail.
* Add: AI Research now includes the full chat transcript.
* Add: Auto-sync on activation; incremental sync on publish / update / delete.
* Add: Sync Now menu item.

= 1.4.0 =
* Add: Leads Pipeline with stage tracking (New, Contacted, Qualified, Won, Lost).
* Add: Form Builder with AI-generated fields or basic mode.
* Add: AI Lead Research and Draft Email.
* Add: Geolocation on every lead.
* Add: `[bitbot_form]` shortcode.

= 1.3.0 =
* Add: URL-based content generation — generate posts from any web URL.

= 1.2.0 =
* Add: Page management — add, remove, toggle, resync individual pages.
* Add: Conversation history viewer in admin.
* Add: Reconnect functionality for API key refresh.

= 1.1.0 =
* Add: Multilingual support — 100+ languages with automatic detection.

= 1.0.0 =
* Initial release: chat widget, content sync from sitemap, AI content generator with SEO optimisation, topic discovery, usage tracking, Stripe billing.

== Upgrade Notice ==

= 2.2.4 =
Faster voice answers, sync from inside WordPress with progress and Stop, better page finding on large sites.

= 2.2.3 =
Settings page fix for some hosts, widget in your site's language, language adding on Free.

= 2.2.2 =
Faster voice call connection and cleaner call endings.

= 2.2.1 =
Invitation bubble and WhatsApp fixes, smoother Agent replies.

= 2.2.0 =
Voice calls, improved Agent tools and widget updates, plus reliability fixes.

= 2.0.2 =
Performance improvements for large page libraries, plus minor fixes.

= 2.0.1 =
Minor UI polish and small fixes.

= 2.0.0 =
Major release. BitBot becomes a full AI assistant: the Pro+ Agent, integrations (WooCommerce, Zoho, Pipedrive, Search Console), a redesigned admin, and freemium tiers. Recommended for all users.

= 1.8.3 =
Content indexing edge case handled and mobile view improved. Recommended for all users.

= 1.8.1 =
Big stability + UX pass. Cap messages now surface inline; the chatbot no longer falsely confirms a lead capture when at the Free cap; multilingual replies stay in one language; product-card filters (on sale, price range) work correctly; the Pro→Pro+ swap webhook race is fixed; admin pages past 1,000 rows paginate properly. Recommended for all users.

= 1.7.0 =
Pro+ tier launches — the chatbot becomes an agent that recommends products, takes draft orders with checkout links, looks up orders, and hands off to humans. Live Chats admin dashboard with real-time presence and one-click takeover.

= 1.6.0 =
Free plan is now free forever. Pro at $20/mo for unlimited chat, posts, forms, and leads, plus AI Lead Research and drafted follow-up emails.

= 1.5.0 =
Chat-to-lead capture and incremental sync on publish.

= 1.4.0 =
New leads pipeline. Capture leads with custom forms, track them through stages, let AI research and draft follow-up emails.

= 1.1.0 =
100+ languages with automatic detection.

= 1.0.0 =
Initial release.
