=== ChatSell Widgets ===
Contributors: chatsell
Tags: chat, chatbot, product search, ecommerce, ai
Requires at least: 5.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Easy-to-use chat and product search widgets for WordPress sites. Add AI-powered customer support and product discovery to your site.

== Description ==

ChatSell Widgets brings powerful AI-powered customer support and product discovery to your WordPress site. Connect your site to your ChatSell account and embed fully customisable widgets in minutes.

**Chat Widget**

* Real-time AI-powered customer support
* Product recommendations and search
* Customisable appearance and behaviour
* Multiple positioning options
* Sound notifications and avatar display

**Product Search Widget**

* Lightning-fast product search
* Floating or inline positioning
* Product variant filtering
* Customisable styling
* Keyboard shortcut (press "/" to open)
* Responsive design

**Ask AI Widget**

* Let visitors ask questions answered from your knowledge base
* Floating button or inline embed
* Fully customisable appearance

**Key Features**

* Easy setup through WordPress admin — no coding required
* Shortcode support for flexible widget placement
* Customisable colours and positioning
* Product variant filtering
* Real-time WooCommerce product, page, and post sync (optional)
* Mobile-responsive design

= External Services =

This plugin connects to the **ChatSell service** (https://chatsell.co) to power the AI chat, product search, and Ask AI widgets. By configuring and enabling this plugin, the following data may be transmitted to ChatSell servers:

* Your ChatSell Site ID (stored locally, sent with API requests)
* Visitor chat messages and product search queries (processed by the ChatSell AI)
* WooCommerce product data and published page/post content (only when real-time sync is enabled)

Widget JavaScript files are loaded from the configured ChatSell frontend URL (default: https://app.chatsell.co).

* Terms of Service: https://chatsell.co/terms
* Privacy Policy: https://chatsell.co/privacy

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/chatsell-widgets` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to **Settings > ChatSell Widgets** to configure your widgets.
4. Enter your Site ID from your ChatSell dashboard.
5. Enable and customise the widgets you want to use.
6. Use the shortcodes `[cswidgets_chat]`, `[cswidgets_search]`, and `[cswidgets_ask]` to place widgets anywhere on your site.

== Frequently Asked Questions ==

= How do I get my Site ID? =

Your Site ID is available in your ChatSell dashboard. Log in at https://chatsell.co and navigate to your site settings.

= Do I need a ChatSell account? =

Yes. ChatSell is a Software as a Service (SaaS) platform. You need an account at https://chatsell.co to use this plugin.

= Can I customise the appearance? =

Yes. Colours, positioning, text labels, and behaviour are all configurable from the Settings > ChatSell Widgets page in WordPress admin.

= Can I use shortcodes to place widgets? =

Yes. Use `[cswidgets_chat]` for the chat widget, `[cswidgets_search]` for product search, and `[cswidgets_ask]` for the Ask AI button. Parameters can be passed to override settings on a per-placement basis. For visitor storage mappings, shortcode `dynamic_params` values are limited to mappings already saved in the admin settings.

= Do the widgets work on mobile? =

Yes, all three widgets are fully responsive.

= What is real-time sync? =

When enabled, WooCommerce product changes and published WordPress page/post changes are immediately forwarded to ChatSell so your AI and knowledge base stay up to date. Product sync requires WooCommerce and all real-time sync requires a webhook secret from your ChatSell dashboard.

== Screenshots ==

1. ChatSell dashboard — manage your AI chatbot, knowledge base, and analytics.
2. AI chat widget in action on a live storefront.
3. Ask AI widget — let visitors ask questions answered directly from your knowledge base.

== Changelog ==

= 1.0.5 =
* Sync published WordPress page and post changes to the ChatSell knowledge base through the existing real-time webhook.

= 1.0.4 =
* Share product discovery settings between Ask AI and Product Search.
* Send dynamic product parameters with Ask AI product questions.

= 1.0.3 =
* Send real-time product sync webhooks when WooCommerce product variation prices or stock are saved.

= 1.0.2 =
* Move admin CSS and JavaScript to separate enqueued files for standards compliance.
* Replace inline script config output with wp_add_inline_script for cleaner page output.
* Update default API and frontend URLs to production ChatSell service endpoints.
* Fix product sync webhook to use non-blocking HTTP request.
* Add external services disclosure to readme.
* Fix duplicate Plugin URI / Author URI in plugin headers.

= 1.0.1 =
* Align plugin version metadata for packaged releases.
* Add GitHub release pipeline support for distributable plugin zip files.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.5 =
Recommended for stores using Ask AI with WordPress pages and posts as knowledge sources.

= 1.0.3 =
Recommended for WooCommerce stores using variable products.

= 1.0.2 =
Standards compliance and production URL update. Upgrade recommended for all users.
