=== Blackwall Systems AI Chatbot ===
Contributors: blackwallsystems
Tags: woocommerce, chatbot, ai, live chat, customer support
Requires at least: 6.2
Requires PHP: 7.4
Stable tag: 2.5.9
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A self-hosted AI sales and customer-support platform built specifically for WooCommerce.

== Description ==

Blackwall Systems AI Chatbot combines an AI storefront assistant, verified WooCommerce customer service, controlled cart operations, human live support, business knowledge retrieval, and performance analytics inside WordPress.

Choose the AI connection that fits the business: OpenAI, Anthropic Claude, Google Gemini, xAI Grok, DeepSeek, a custom OpenAI-compatible endpoint, or an n8n/JSON webhook. The site owner controls the provider account, model selection, usage limits, and workflow.

= WooCommerce-native assistance =

* Answer product questions using current WooCommerce product, variation, price, stock, weight, description, SKU, and configured metadata.
* Detect order questions and request the configured verification information before exposing private order details.
* Return order status, billing or shipping information when enabled, tracking information, and configured custom order metadata.
* Keep completed and existing orders permanently read-only.
* Optionally prepare cart additions, quantity changes, removals, coupon application, and cart clearing.
* Require explicit text confirmation before every cart mutation.
* Enforce product/category exclusions, quantity limits, and maximum products per action.

= AI and human support in one system =

Visitors can request a human without abandoning the conversation. Authorized WordPress users can claim chats, reply in real time, see customer and order context, add internal notes, use saved responses, close cases, archive them, mark spam, restore conversations, and apply legal holds. Email handoff and direct SMTP are available when live agents are unavailable.

= Business training and knowledge retrieval =

The Training Center stores stable company, product, shipping, return, contact, tone, and policy guidance. Upload DOCX, TXT, RTF, CSV, Markdown, or ZIP files. The plugin processes documents locally and retrieves relevant sections for each customer question.

= Security and cost controls =

* AES-256-GCM encryption for API keys, webhook secrets, Turnstile secrets, and SMTP passwords stored in WordPress.
* Optional wp-config.php constants and environment variables that override database credentials without saving them in WordPress.
* Automatic migration of existing plaintext credentials.
* Password fields never redisplay saved secrets.
* WordPress nonce and capability enforcement.
* HTTPS-only outbound endpoints with localhost, private-network, and reserved-address blocking.
* Per-session and per-IP rate limits, message cooldowns, hard message-size limits, and Cloudflare Turnstile.
* Daily AI-request budgets and concurrent-request limits.
* Structured security audit logging, log redaction, retention controls, and diagnostic reporting.

= Analytics and business outcomes =

Measure conversations, AI requests, response time, failed provider calls, knowledge-document usage, customer feedback, classified outcomes, custom-button engagement, clicked links, sales attribution, attributed revenue, and estimated support labor savings.

= Privacy and ownership =

Conversation storage is optional. Sites can require consent before storing or sending messages, define retention periods, run cleanup manually, and delete stored conversations. The plugin remains installed in the site's WordPress environment; external data processing depends on the AI and email providers selected by the site owner.

== Installation ==

1. Upload the plugin ZIP through Plugins > Add New > Upload Plugin.
2. Activate Blackwall Systems AI Chatbot.
3. Open BWS Chatbot > Configuration and complete the setup wizard.
4. Select an AI provider or webhook and enter its credentials.
5. Configure WooCommerce access, cart permissions, support, retention, and security controls.
6. Use Test Connection and System Status before enabling the storefront widget.

For production credential deployment, see `docs/SECURE-CREDENTIALS.md` in the plugin package.

== Frequently Asked Questions ==

= Does the plugin include AI usage? =

No. The site owner connects an account with a supported AI provider, an n8n workflow, or a compatible self-hosted service. Provider charges and limits are separate from the plugin.

= Can it change existing WooCommerce orders? =

No. Existing orders are permanently read-only. The optional cart assistant can modify only the visitor's active pre-purchase cart and requires explicit confirmation before each action.

= Are saved API keys stored as plaintext? =

No. Version 2.2.1 encrypts supported credentials before saving them to the WordPress options table. Production deployments can instead use wp-config.php constants or environment variables.

= Does changing WordPress salts affect encrypted credentials? =

Yes. Database encryption is derived from WordPress security salts. After rotating salts, re-enter database-managed plugin credentials. Environment-managed credentials are unaffected.

= Is WooCommerce required? =

The basic AI chat and support functions can operate without WooCommerce. WooCommerce is required for products, orders, customer profiles, cart actions, and sales attribution.

= Where is automated testing performed? =

The package includes a repeatable local test runner, PHPUnit tests, release audits, syntax checks, and a GitHub Actions workflow. Run `composer test` or `bash bin/run-tests.sh`. GitHub Actions executes the suite automatically on pushes and pull requests when the plugin is maintained in a repository.

== Licensing and Premium subscription ==

The plugin software is distributed under the GNU General Public License, version 2 or later. A Blackwall Systems Premium subscription is a separate commercial service that provides Premium entitlement, licensing services, updates, and support according to the subscription terms offered by Blackwall Systems.

Premium activation contacts the Blackwall Systems licensing service over HTTPS. The licensing request can include the license key, site URL, installation identifier, plugin version, and a site fingerprint used to bind and validate the installation. Premium status is cached locally and periodically revalidated.

AI-provider usage is not included with the plugin subscription. The site owner supplies credentials for the selected AI provider or webhook and is responsible for any provider charges, quotas, and terms.

== Privacy and external services ==

Blackwall Systems AI Chatbot can process visitor chat messages, WooCommerce product/order context, customer-supplied verification information, support information, and conversation analytics depending on the features enabled by the site owner.

AI requests are sent only to the provider or endpoint configured by the site owner. Supported connections include OpenAI, Anthropic Claude, Google Gemini, xAI Grok, DeepSeek, custom OpenAI-compatible APIs, and n8n/JSON webhooks. Optional Cloudflare Turnstile can be used for abuse protection. Local voice transcription uses a bundled Transformers.js runtime and downloads the configured Whisper model to the visitor's browser on first use.

Conversation storage is configurable. Site owners can require visitor consent, configure retention, manually clean stored conversations, and remove stored plugin data. The site owner is responsible for configuring the plugin consistently with the site's privacy policy and applicable law.

See `docs/PRIVACY.md` and `docs/THIRD-PARTY-SERVICES.md` for detailed deployment disclosures and `docs/GETTING-STARTED.md` for installation guidance.

== Support and updates ==

For the directly distributed commercial edition, obtain current downloads, subscription information, and support from Blackwall Systems at https://blackwallsys.com/.

== Screenshots ==

1. Configuration and guided setup wizard.
2. AI provider, WooCommerce, security, appearance, and support controls.
3. Searchable built-in Knowledge Base.
4. Training Center and document processing.
5. Live-support queue and conversation workspace.
6. Analytics, outcomes, knowledge usage, and sales attribution.
7. System Status and diagnostic reporting.
