=== BoostBot - AI Chatbot ===
Contributors: boostmedia, giladch1
Donate link: https://boostmedia.co.il/
Tags: chatbot, ai, woocommerce, customer-service, live-chat
Requires at least: 6.2
Tested up to: 6.9
Stable tag: 2.2.17
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

BoostBot is an intelligent AI-powered chatbot that understands your website content and helps visitors find what they need.

== Description ==

**BoostBot** transforms your WordPress website with an intelligent AI chatbot. Unlike traditional chatbots that follow rigid scripts, BoostBot truly understands your content and provides helpful, contextual responses to your visitors.

= Key Features =

**🤖 AI-Powered Conversations**
* Natural language understanding powered by advanced AI
* Contextual responses based on your actual content
* Multi-turn conversations with memory

**📚 Smart Knowledge Base**
* Automatically indexes your posts, pages, and products
* Extracts technical specifications and pricing
* Full Elementor content support
* Real-time content synchronization

**🎯 Multiple Chatbots**
* Create different bots for different purposes
* Display conditions (by page, category, product type)
* Unique personalities and behaviors
* Contact lists for each bot

**🧩 Interactive Widgets**
* Lead capture forms
* WhatsApp integration
* Calendar booking
* Coupon display
* Image galleries
* YouTube embeds
* Quick buttons

**🛒 WooCommerce Integration**
* Product search and recommendations
* Add to cart functionality
* Order status inquiries
* Price and stock information

**📊 Analytics & Insights**
* Conversation tracking
* Lead management
* Export to CSV
* Performance metrics

**🎨 Customizable Design**
* Match your brand colors
* RTL support (Hebrew, Arabic)
* Responsive design
* Smooth animations

= Use Cases =

* **Customer Support** - Answer common questions automatically
* **Lead Generation** - Capture visitor information
* **E-commerce** - Help shoppers find products
* **Booking** - Schedule appointments via chat
* **Information** - Share knowledge base articles

= Requirements =

* WordPress 6.2 or higher
* PHP 8.0 or higher

== Installation ==

1. Upload the `boostbot` folder to the `/wp-content/plugins/` directory, or install directly through the WordPress plugins screen.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to **BoostBot** in your admin menu to start the setup wizard.
4. The wizard will guide you through creating your first chatbot, setting up your knowledge base, and customizing the appearance.
5. BoostBot connects to the BoostBot Cloud service for AI-powered conversations. No separate API keys are required — everything is included.

== Frequently Asked Questions ==

= How does BoostBot work? =

BoostBot indexes your website content (pages, posts, products) into a knowledge base. When a visitor asks a question, the AI uses this knowledge to provide accurate, contextual responses. All AI processing happens through the BoostBot cloud service.

= How much does the AI cost? =

BoostBot uses a credit-based system called BoostCoin. You purchase credits and each AI conversation uses a small number of credits. See the Usage section in the plugin admin for pricing details.

= Does it work with WooCommerce? =

Yes! BoostBot has full WooCommerce integration including product search, add to cart, and order inquiries.

= Is it GDPR compliant? =

BoostBot stores conversation data locally in your WordPress database. Chat messages are sent to the BoostBot cloud service for AI processing (see External Services below). You control all data retention and can export or delete conversations at any time.

= Does it support RTL languages? =

Yes! BoostBot has full RTL support for Hebrew, Arabic, and other right-to-left languages.

= Can I have multiple chatbots? =

Yes! You can create multiple chatbots with different personalities, behaviors, and display conditions.

= What is the Knowledge Base feature? =

BoostBot automatically indexes your website content so the AI can provide accurate, relevant answers based on your actual pages, posts, and products.

== Screenshots ==

1. Chat widget on your website - clean, modern design
2. Admin Dashboard - see all conversations and leads at a glance
3. Settings page - customize appearance and behavior
4. Knowledge Base - manage indexed content
5. Analytics - track chatbot performance
6. Multiple bots - create different bots for different pages
7. Widget examples - forms, calendars, product cards
8. WooCommerce integration - product search in chat

== Changelog ==

= 2.2.16 =
* Improved: Bot appearance tab simplified — edit via appearance settings only
* Fixed: Rounded corners display in chat messages
* Improved: Custom fonts load correctly in all preview modes
* Improved: Preview renders the correct preset language setting

= 2.2.15 =
* Fixed: Border radius sharp corner rendering in chat preview
* Improved: Custom fonts now load in all previews including bot tab
* Improved: Preview renders based on preset language, not admin language

= 2.2.14 =
* Improved: Unified appearance previews across all admin screens
* Improved: Deep merge of widget section settings ensures complete display
* Fixed: WooCommerce preset card name layout
* Fixed: Calendar availability editor crash on legacy data format

= 2.2.13 =
* Improved: Appearance preview fully translated to Hebrew
* Fixed: Preset card displays full setting name
* Fixed: Bundle builder preview header color

= 2.2.12 =
* Fixed: Bot appearance correctly shows colors, cart, coupons, and bundle builder
* Fixed: Default font changed to Heebo for proper loading
* Improved: Save button state resets correctly after successful save
* Improved: Middle-click and Ctrl+click in sidebar opens in new tab

= 2.2.11 =
* Improved: Admin sidebar narrower to give more content space
* Improved: Bot settings tabs more compact

= 2.2.10 =
* Fixed: Bot appearance preview shows correct colors from linked preset
* Improved: Cart, coupons, and bundle builder available in bot appearance tab
* Fixed: Product card without price no longer shows empty currency symbol

= 2.2.9 =
* Improved: Unsaved changes guard on sidebar navigation, browser back, and language switch
* Fixed: Custom colors in appearance remain stable when deleting colors
* Improved: Translations update in real-time across all admin pages

= 2.2.8 =
* Fixed: Leads search works fully on server side
* Fixed: Default personality no longer overrides defaults in other languages
* Improved: Language filtering on leads, meetings, knowledge base, and dashboard
* Improved: Error handling across all admin tabs
* Security: Backup export no longer includes sensitive keys
* Security: Changelog HTML sanitized in updates page

= 2.2.7 =
* Fixed: WooCommerce feature badges display correctly
* Improved: Editing a preset from bot settings returns to the same bot
* Improved: Full Hebrew translation for personality editing page

= 2.2.6 =
* Improved: Full Hebrew translation for Knowledge Base, Usage & Costs, and Cart appearance
* Improved: Clearer usage category display in usage dashboard

= 2.2.5 =
* Improved: Chat responds up to 10x faster on sites with large knowledge bases
* Improved: Full multilingual support across admin and chat widget
* Improved: Remote management with clear permissions and enhanced import
* Fixed: Chat appearance displays correctly with legacy presets

= 2.2.4 =
* Full multilingual i18n for admin and chat widget
* Hebrew search prefix stripping for improved accuracy
* AI indexing engine upgrade

= 2.2.3 =
* Fixed: Chat works without interruption on sites with active caching plugins
* Fixed: Improved script loading compatibility with deferred scripts

= 2.2.2 =
* Improved: AI indexing engine upgrade for better content understanding
* Fixed: Search accuracy improvements in knowledge base

= 2.2.1 =
* Improved: Hebrew search accuracy with automatic prefix stripping
* Improved: Search health observability for administrators

= 2.2.0 =
* New: AI is now cart-aware — references your products by name and suggests complements
* New: Bundle builder excludes products already in your cart
* New: Line-item bundle pricing option — show discounted prices directly on each product
* New: Admin toggle for bundle discount method (coupon vs line-item)
* Fix: Prevented phantom widget references in chat responses

= 2.1.1 =
* New: AI now knows what's in your cart and can suggest complementary products
* New: Bundle builder avoids recommending products already in your cart
* Enriched cart context with item names, categories, and prices for smarter AI responses

= 2.0.9 =
* Fixed bundle add-to-cart not updating cart badge/drawer immediately
* Fixed widget embed detection on landing pages

= 2.0.8 =
* Fixed bundle add-to-cart not updating cart badge/drawer
* Fixed settings page showing "Backend returned an error" incorrectly

= 2.0.7 =
* Fixed cart badge and drawer not updating after adding products

= 2.0.6 =
* Fixed in-chat cart badge and drawer not updating after adding products
* Fixed cart drawer not showing all products
* Fixed calendar widget showing dates in wrong language on English sites
* Improved cart state reliability and sync flow
* Lead form: added spacing control above submit button
* Calendar: day header and month/year typography controls

= 2.0.4 =
* Skipped — superseded by 2.0.6 (version numbering correction)

= 2.0.3 =
* Fixed cart badge not updating immediately after adding products
* Fixed bundle builder exceeding stated budget
* Added diagnostic logging for commerce flows
* Appearance preset lead form gap control

= 2.0.2 =
* Fixed bundle builder for Hebrew categories
* Fixed coupon widget appearance preset styling
* Added diagnostic logging for commerce flows

= 2.0.1 =
* Cart drawer: fixed the header cart button so the drawer opens reliably when the preset enables cart access
* Coupon widget: copy buttons now show a clear copied state for 2 seconds after a successful click
* Search transitions: preserved redirect search intent across page changes so proactive follow-ups stay relevant

= 2.0.0 =
* Commerce telemetry: full funnel tracking for shopping interactions inside the chat experience
* Analytics: new Commerce Funnel dashboard with daily trends, funnel stages, top products, top coupons, and language or bot breakdowns
* Performance: shopper events are queued and sent in the background so cart, coupon, bundle, and checkout actions stay responsive
* Reporting: WooCommerce telemetry now records language and currency context for more reliable commerce analytics
* Milestone: completes the full M1-M6 commerce migration

= 1.9.1 =
* Rate limits: added a dedicated commerce bucket for cart, coupon, and bundle-builder actions so normal shopper flows no longer trip the chat limiter
* WooCommerce: cart, checkout, and bundle store links now resolve through Polylang in REST contexts for the active language
* Opening screen: restored sales demo quick-reply presets and aligned frontend error localization for Hebrew rate-limit messaging
* Polish: coupon copy feedback and rebuilt frontend assets are included in the release bundle

= 1.9.0 =
* Coupon: one-click "Apply to Cart" and "Remove" actions in the coupon widget
* Coupon: applicability badges, minimum-spend hints, expiry display, and free-shipping states
* Coupon: localized validation and widget strings for Hebrew and English
* Cart: applied coupons and discount totals now sync into the chat cart experience
* AI: orchestrator suggestions are now coupon-aware based on the current cart state
* Appearance: coupon preset controls and preview states now match the live widget

= 1.7.0 =
* Product card add-to-cart loading, success, and error states
* Product card quantity selector with stock-aware limits
* Product card sale, out-of-stock, and low-stock badges
* AI product recommendations now prefer in-stock items
* Product card appearance preset parity for badges, quantity, and button states
* Product card strings and sale/stock messaging localized for Hebrew and English

= 1.6.0 =
* In-chat cart progression with header badge, cart drawer, and live totals
* Cart quantity update and remove operations inside chat
* Server-backed WooCommerce cart sync after every add-to-cart action
* Cart appearance preset controls in the editor, preview, and live widget
* AI can respond with cart-aware commerce flows based on current cart state
* Fixed bundle budget enforcement and add-to-cart flicker
* Fixed add-to-cart error handling in WooCommerce cart actions
* Cart strings are now fully localized for Hebrew and English

= 1.5.0 =
* Overhauled multilingual currency system — works on all Polylang versions
* Fixed currency display on product cards ($ vs ₪) in REST API contexts
* Added backend connection status indicator on Settings page
* Chat widget hidden when backend is unreachable
* Widget decisions now independent of word limit setting
* Added missing Language::get_current() method (compatibility fix)
* Added WooCommerce function guard (compatibility for non-WC sites)
* Fixed backend health check response parsing
* Upgraded AI engine to Gemini 3 Flash
* Added low-credit email alerts at 20%, 10%, 0% thresholds
* Fixed revenue tracking for conversation summaries and brand card generation
* Improved usage dashboard category display

= 1.4.9 =
* Fixed currency symbol showing as HTML code in product card widgets
* Fixed AI chatbot answering with wrong currency for English products
* Currency symbols now display correctly across all widget types

= 1.4.8 =
* Fixed currency display on product cards in multilingual stores
* English products now correctly show $ instead of ₪

= 1.4.5 =
* Upgraded AI engine to Gemini 3 Flash
* Added low-credit email alerts (20%, 10%, 0% thresholds)
* Added connection status indicator on Settings page
* Chat widget now hidden when backend is unreachable
* Fixed revenue tracking for conversation summaries and brand card generation
* Improved usage dashboard category display

= 1.0.0 =
* Initial release
* AI-powered chat
* Knowledge Base with RAG
* Multiple chatbots support
* Personality system
* Interactive widgets (forms, WhatsApp, calendar, coupons, galleries)
* WooCommerce integration
* Analytics and lead management
* Full RTL support
* Responsive design

== Upgrade Notice ==

= 1.0.0 =
Initial release of BoostBot - AI Chatbot.

== Development ==

BoostBot is open source under GPLv2. The full TypeScript source code for the
admin panel and the chat widget is shipped inside this plugin, alongside the
compiled bundles, so you can audit and rebuild every shipped JavaScript file
directly from the ZIP.

**Where the source lives:**

* `admin/src/` — TypeScript + React source for the admin UI (compiled into `assets/dist/admin/`).
* `frontend/src/` — TypeScript + React source for the chat widget (compiled into `assets/dist/frontend/`).
* Build configuration (`package.json`, `tsconfig.json`, `vite.config.ts`, etc.) is included in both `admin/` and `frontend/`.

**Build from source:**

1. Install Node.js 18 or higher and npm 9 or higher.
2. From the plugin directory, build the admin bundle:
   * `cd admin`
   * `npm install`
   * `npm run build`
3. Build the chat widget bundle:
   * `cd ../frontend`
   * `npm install`
   * `npm run build`

The compiled output is written to `assets/dist/admin/` and `assets/dist/frontend/`, which is exactly what the plugin loads at runtime.

Contributions, bug reports, and feature requests are welcome at support@boostmedia.co.il.

== External Services ==

This plugin connects to external third-party services for AI processing and related functionality. By using this plugin, you agree to the terms and privacy policies of these services.

**BoostBot Cloud Service**

* Service URL: https://boostbot.boostmedia.co.il
* Provider: Boost Media Ltd.
* Privacy Policy: https://boostbot.boostmedia.co.il/privacy-policy
* Terms of Service: https://boostbot.boostmedia.co.il/terms-of-service

The BoostBot cloud service is used for:

1. **AI chat responses** — When a visitor sends a message, the message and relevant knowledge base context are sent to the BoostBot service, which processes them using AI language models (Google Gemini, OpenAI GPT) and returns a response.
2. **Knowledge base indexing** — Page content from your site is sent to the service for semantic indexing, enabling the AI to answer questions about your content.
3. **Credit management** — The service tracks BoostCoin credit usage for AI operations.
4. **Plugin updates** — When self-hosted, the plugin checks the service for available updates (version.json). On WordPress.org, updates come through the standard WordPress update system.

Data sent to the service includes: your site URL, page content submitted for indexing, chat messages, and anonymized visitor interaction data. The service does not collect personal data about your visitors beyond what is included in chat messages.

The BoostBot service uses the following AI providers for processing:

* **Google Gemini API** (https://ai.google.dev/) — Used for conversation orchestration. Privacy Policy: https://policies.google.com/privacy
* **OpenAI API** (https://openai.com/) — Used for generating chat responses. Privacy Policy: https://openai.com/privacy/

**Voyage AI**

* Service URL: https://api.voyageai.com
* Provider: Voyage AI, Inc.
* Purpose: Text embedding generation for knowledge base semantic search
* Terms of Service: https://www.voyageai.com/terms-of-service
* Privacy Policy: https://www.voyageai.com/privacy-policy

When content is indexed into the knowledge base, text chunks are sent to the Voyage AI API to create vector embeddings used for semantic search. This happens through the BoostBot cloud service; the plugin does not call the Voyage AI API directly.

**Anthropic Claude**

* Service URL: https://api.anthropic.com
* Provider: Anthropic PBC
* Purpose: Optional AI model for generating chat responses
* Terms of Service: https://www.anthropic.com/terms
* Privacy Policy: https://www.anthropic.com/privacy

When enabled as the AI provider, user messages and conversation context are sent to the Anthropic Claude API for processing. This happens through the BoostBot cloud service; the plugin does not call the Anthropic API directly.

**PayPal**

* Service URL: https://www.paypal.com
* Provider: PayPal Holdings, Inc.
* Purpose: Payment processing for BoostCoin credit purchases
* Terms of Service: https://www.paypal.com/webapps/mpp/ua/useragreement-full
* Privacy Policy: https://www.paypal.com/webapps/mpp/ua/privacy-full

PayPal is used when you purchase BoostCoin credits through the plugin admin. Payment data is handled directly by PayPal; the plugin does not store credit card information.

== Privacy ==

BoostBot stores the following data in your WordPress database:
* Visitor messages and AI responses
* Lead information (if collected via forms)
* Knowledge base content (indexed pages and posts)
* Conversation analytics and usage statistics

This data is stored locally on your server. You can export or delete it at any time through the admin panel.

For AI processing, chat messages and knowledge base content are sent to the BoostBot cloud service (see External Services above). The cloud service processes this data using third-party AI providers (Google Gemini, OpenAI) and returns responses. Refer to each provider's privacy policy for details on how they handle data.

== Support ==

For support, please visit:
* [Documentation](https://boostbot.boostmedia.co.il/docs)
* [Support Forum](https://wordpress.org/support/plugin/boostbot/)
