=== Wow Chat for Woo – Chatbot, Product Finder, FAQ & Search for WooCommerce ===
Contributors: thinkmatic
Tags: chatbot, woocommerce, chat, faq, search, product finder, live chat, recommendations, related products, ecommerce, ai, gdpr
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.2.2
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Chatbot, product finder, FAQ and product search for WooCommerce. Runs on your own site — no account, no subscription, nothing phones home.

== Description ==

Shoppers who can't find what they want leave. Wow Chat for Woo gives your WooCommerce store a chatbot, a guided product finder, an FAQ system and instant product search — all running on your own server, with no account to create and no monthly bill.

This is not a hosted chat service with a WordPress wrapper around it. There is no signup, no external dashboard, and no per-message pricing. Activate the plugin, spend a few minutes in the settings, and shoppers get answers backed by your real catalog — with product cards they can add to the cart without leaving the conversation.

= Why merchants choose it =

* **Nothing to sign up for.** No account, no API key, no trial clock. Install, configure, done.
* **No monthly fees.** Everything on this page is free — no message caps, no seat limits, no upgrade wall in the middle of a conversation.
* **It knows your catalog.** Chat replies and search results come from your own products, with image, price, stock state and a working add-to-cart button.
* **Private by architecture.** Shopper messages, search queries and analytics stay in your own WordPress database. The plugin does not phone home. The single optional exception — the AI FAQ Generator — is described below, and it does nothing until you enter your own key.

= Chatbot and product finder =

Choose the shape that suits your store: a floating **bubble**, a slide-in **drawer**, or an immersive **full-screen finder**.

* Answers come from FAQ entries you write. When nothing matches, the chat searches your catalog and replies with matching products instead of a dead end.
* Product cards show your WooCommerce image, price and stock state, and add to the cart silently so shoppers stay in the conversation. Variable and external products show WooCommerce's own button text ("Select options", "Read more") and link through correctly.
* Opening suggestions — quick-reply starters you curate — give shoppers something to tap instead of a blank prompt.
* The launcher is yours to style: custom label, an icon or no icon at all, and colors that match your theme.
* You decide how many product cards an answer may show (1 to 8).

= Instant product search =

* Results appear as the shopper types, with no page reload.
* Backed by a dedicated product index and a MySQL FULLTEXT ranker that understands word forms (a search for "boots" also matches "boot"), matches SKUs exactly, favours products whose title contains what was typed, and gives in-stock and recently updated products a lift.
* The search dictionary is built from your own catalog — your categories, tags, brands and attributes — so it speaks your store's vocabulary rather than a generic word list.
* It can optionally take over your theme's default search box, so every search on the site uses it.
* Place it anywhere with the **Wow Search** block or the `[wow_chat_for_woo_search]` shortcode.

= FAQ system =

Write an FAQ entry once — a few trigger phrases and the answer — and the chat handles shoppers who ask the same thing a dozen different ways.

* Attach products, categories, tags, brands, on-sale items or featured items to any entry, and matching answers show those products as cards.
* Everything is stored on your own site and works with no third-party service.

= AI FAQ Generator (optional) =

Draft a batch of FAQ entries from your catalog using **your own OpenAI API key**, review them in a grid, edit anything you want, and publish only the ones you like.

* Requests go from your server straight to OpenAI with your key. Nothing is routed through us — we never see your key, your catalog or your drafts.
* This is the only feature that contacts a third party, and it does nothing until you enter a key. Leave it blank and the plugin stays entirely local.

= Recommendation widgets =

* **Recently viewed** — bring shoppers back to products they already looked at.
* **Related products** and **Frequently bought together** — surface the next thing to buy on product pages.

= Analytics that stay on your site =

Conversations, answered rate, top shopper questions, top search queries and product clicks — collected locally and shown on the plugin dashboard. There is no external analytics service, and nothing leaves your database.

= Blocks, shortcode and developer hooks =

Four blocks — **Wow Search**, **Wow Recently Viewed**, **Wow Related Products**, **Wow Frequently Bought Together** — plus the `[wow_chat_for_woo_search]` shortcode.

Developers get filters throughout: `wow_chat_for_woo_search_results`, `wow_chat_for_woo_search_strategy`, `wow_chat_for_woo_search_dictionary`, `wow_chat_for_woo_replace_default_search`, `wow_chat_for_woo_related_ids`, `wow_chat_for_woo_fbt_ids`, `wow_chat_for_woo_chat_config`, `wow_chat_for_woo_storefront_suggestions`, `wow_chat_for_woo_faq_generate_prompt`, and more.

= Wow Chat for Woo Pro (coming soon) =

A separate Pro plugin is in development, adding AI chat that understands shopper intent, smarter search and recommendations, and more ways to reach shoppers. It is not available yet, and nothing on this page depends on it.

[Reserve early access](https://thinkmatic.net/products/wow-chat-for-woo/#early-access)

= Links =

* [Plugin homepage and documentation](https://thinkmatic.net/products/wow-chat-for-woo/)
* [Support forum](https://wordpress.org/support/plugin/wow-chat-for-woo/)
* Building from source: see the Development section below — the plugin ships full, readable source for every compiled asset.

== Installation ==

1. Install through **Plugins → Add New**, or upload the plugin folder to `/wp-content/plugins/wow-chat-for-woo`.
2. Activate "Wow Chat for Woo" from the Plugins screen. WooCommerce must be active.
3. Open **Wow Chat** in the WordPress admin menu to switch on the chat, style the launcher, add FAQ entries, and place the search bar and recommendation widgets.

== Frequently Asked Questions ==

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

No. The chatbot, product finder, FAQ system, search and recommendation widgets all work as soon as you activate the plugin — no account, no key, nothing to connect. The only exception is the optional AI FAQ Generator, which uses an OpenAI key you supply yourself.

= Is any data sent off my site? =

No. Shopper messages, search queries and analytics are processed and stored on your own WordPress install, and the plugin does not phone home. The one exception is opt-in: if you enter your own OpenAI key and run the AI FAQ Generator, your server sends that request to OpenAI. Leave the key blank and nothing ever leaves your site.

= Is it really free? =

Yes. Everything described on this page is free, with no message caps and no time limit. A separate Pro plugin is in development; it will be optional, and it will not take anything away from this one.

= Does it slow down my store? =

The storefront code is plain JavaScript with no jQuery dependency. The chat bundle is loaded only when you have the chat switched on, and the search and recommendation assets load only on pages that actually use them. Search runs against a dedicated index table instead of scanning your posts table with `LIKE` queries.

= Do I need an OpenAI key? =

Only if you want the AI FAQ Generator to draft FAQ entries for you. Every other feature is fully local and ignores it.

= What does the activity log store? =

The Logs page keeps a local record of admin actions — which setting changed, who changed it, when, and the IP address of the person who made the change. This is standard for a WordPress activity log and is how you spot an unexpected change.

It never stores API keys or other secrets: values are redacted before anything is written. Entries are deleted automatically on the schedule set by "Conversation log retention" under Settings → Advanced, and you can clear the log at any time from the Logs page. AI usage history (token counts and estimated cost) is kept for a year so all-time totals stay meaningful.

= Does it work with my theme? =

Yes. The chat launcher is added to the storefront and styled from the plugin settings, and search and recommendations can be placed with blocks or the shortcode. Search can also take over your theme's existing search box.

= Can shoppers add to cart from chat? =

Yes. Simple products are added silently, without leaving the conversation. Variable and external products show WooCommerce's own button text and link to the product page so the shopper can choose options.

= Where can I report bugs or request features? =

Please use the support forum on WordPress.org or open an issue at the plugin's homepage.

== Screenshots ==

1. Full-screen product finder helps shoppers browse and search your catalog from a guided overlay.
2. Floating chat panel answers common questions and recommends matching products.
3. Storefront launcher gives visitors a clear "Find Products" entry point while they shop.
4. Dashboard overview shows search, chat, plugin version, health status, and setup steps.
5. Chat appearance settings let merchants choose the shopper experience and color palette.
6. Chat suggestions provide quick-reply starters for common shopper intents.
7. FAQ entries connect shopper questions with rule-based answers and product attachments.

== Development ==

This plugin ships both the compiled assets (in `build/`) and their full, human-readable source so the build is reproducible.

* **JavaScript/TypeScript/SCSS source:** `src/` — every bundle under `build/` is compiled from a matching entry point in `src/` (e.g. `build/admin/index.js` ← `src/admin/index.tsx`, `build/blocks/<name>/index.js` ← `src/blocks/<name>/index.js`).
* **Build tooling:** [`@wordpress/scripts`](https://www.npmjs.com/package/@wordpress/scripts) (webpack), configured in `webpack.config.js` and `tsconfig.json`. Dependencies and the build script are declared in `package.json` / `package-lock.json`.
* **Build the assets:**
    1. `npm install`
    2. `npm run build` — regenerates everything in `build/`.
* **PHP dependencies:** `composer.json` declares dev-only tooling (PHPUnit, WP Coding Standards). No runtime Composer dependencies. Run `composer install` then `vendor/bin/phpunit` for the PHP test suite.

No third-party JavaScript libraries are bundled into the compiled assets. The only external packages used (`@wordpress/*` and `react`) are not bundled — they load from the WordPress-provided script globals at runtime.

== Changelog ==

= 0.2.2 – 2026-09-06 =
* New: Activity log — the Logs page now records who changed what and when. Settings saves show exactly which settings changed and their before/after values; FAQ and quick-suggestion edits, OpenAI key changes, and search index rebuilds are all tracked.
* New: AI usage tab — see token usage and estimated cost for every AI FAQ generation, with today / 30-day / all-time totals so you can keep an eye on your OpenAI spend.
* New: The Logs page is now split into Activity, AI usage, and System tabs, each with search, filters, date ranges, real pagination, CSV export, and a clear-log action.
* New: Expand any log row to see the full details — the exact settings that changed, or the context and request ID behind a system event.
* New: When an update adds features, the Wow Chat menu and its "What's New" entry carry a badge until you read the release notes — it clears the moment you open the page, and it is tracked per user. Fix-only releases stay quiet.
* Improved: API keys and other secrets are automatically redacted from everything the log stores, and log entries are size-capped.
* Improved: Activity entries follow your existing data-retention setting; AI usage history is kept for a year so your all-time cost total stays meaningful.
* Developer: Any plugin can record its own entries through the `wow_chat_for_woo_record_activity` and `wow_chat_for_woo_record_ai_usage` actions, add labels with `wow_chat_for_woo_activity_events`, and price its own models with `wow_chat_for_woo_ai_model_pricing`.

= 0.2.1 =
* Improved: AI FAQ Generator drafts now cover one shopper question each — the trigger phrases in a draft are real paraphrases of the same request instead of a list of loosely-related keywords.
* Improved: Generated answers stay generic and evergreen. They no longer hard-code product names or prices, so the live product cards shown under each reply are always the source of truth.
* Improved: Each run now spreads its drafts across different shopper intents — finding an item, budget, gifting, size and room fit, availability, and comparisons — instead of rewording "browse this category".
* New: Tone now offers Auto (matches your store's own voice) alongside Concise, Enthusiastic, and Luxury.
* Changed: "Drafts per selection" is now a 1–50 number field instead of a fixed 3 / 5 / 8 choice.
* Improved: Redesigned FAQ generator screen — a full-width review grid that shows every trigger phrase and the reply at a glance, with select-all and publish always in reach.
* Improved: Big generation runs are split per selection, so drafts stream in with live progress and the run can be cancelled without losing what's already drafted.

= 0.2.0 =
* New: AI FAQ Generator — draft FAQ answers from your own OpenAI key, right inside the admin (no external service, merchant-keyed).
* New: Drawer-style chatbot — a new slide-in side-drawer chat appearance alongside the floating bubble and full-screen finder.
* New: Fully redesigned admin dashboard — analytics-first landing page with conversations, answered rate, product clicks, setup checklist, and top-queries.
* New: "What's New" admin page highlighting the latest features with the full changelog.
* Changed: Pro features are now presented as "coming soon" with a "Get early access" call to action while the Pro plugin is in development.
* New: Dashboard early-access link to reserve your spot for Wow Chat for Woo Pro.

= 0.1.1 =
* New: Instant search — the search bar block now shows matching products as you type, without a page reload.
* Improved: The chat launcher and panel are fully settings-driven — customize the launcher label, pick an icon or choose no icon, and set colors from the admin.
* Improved: "Add to cart" from chat product cards now adds items silently across every chat surface, keeping shoppers in the conversation.
* Improved: Chat product cards show WooCommerce's real button text for non-purchasable products (e.g. "Read more", "Select options").
* Improved: Refreshed admin dashboard and Wow-branded Gutenberg blocks.
* Developer: Added hook/filter extension points so add-ons can plug into search, recommendations, and chat.

= 0.1.0 =
* Initial release: catalog product search, recommendation widgets (recently viewed, related, frequently bought together), FAQ product-finder chat, admin React shell, and Gutenberg blocks — all running locally.

== Upgrade Notice ==

= 0.2.2 =
A full activity log of who changed what, plus AI token and cost tracking for the FAQ generator — with search, filters, CSV export, and automatic secret redaction.

= 0.2.1 =
Much better AI FAQ drafts — one shopper question per draft, generic answers that never go stale, 1–50 drafts per selection, new tones including Auto, and a redesigned review screen.

= 0.2.0 =
New AI FAQ Generator, a drawer-style chatbot, and a fully redesigned analytics dashboard. Pro features now show as "coming soon" with an early-access link.

= 0.1.1 =
Instant search, a fully settings-driven chat launcher/panel, silent add-to-cart from chat cards, and a refreshed admin.

= 0.1.0 =
First public release.
