=== TechNXT AI Chat Assistant ===
Contributors: technxt
Tags: chatbot, ai, woocommerce, customer-service, chat
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.2
Stable tag: 2.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connects your WooCommerce/WordPress site with the TechNXT AI Chatbot widget.

== Description ==
TechNXT AI Chat Assistant is a lightweight integration plugin that brings TechNXT AI chatbots to your WordPress website or WooCommerce store.

Key Features:
* One-Click Login: Sign in with your TechNXT account credentials directly inside WordPress.
* Organization & Widget Selector: Choose from your TechNXT Organizations and Chatbot widgets via live dropdowns.
* Customer Awareness: Optionally identify logged-in WooCommerce/WordPress customers (name and email) in the chat widget when visitor recognition is enabled.
* Visibility Options: Control which pages show the widget, with URL exclusion patterns and WooCommerce cart/checkout suppression.
* Privacy Options: Enable or disable visitor recognition; optionally configure a Javascript API Key for Secure Mode.
* WooCommerce Optimization: One-click WooCommerce REST API authorization so the AI assistant can search products and read shopping context.
* Shortcode Support: Trigger the chatbot using `[technxt_chat_trigger]`.

== External services ==

This plugin requires the TechNXT cloud service (configured via the App URL in settings, typically https://app.technxt.co) to provide AI chat, account login, organization/widget selection, and the storefront chat widget.

What the service is used for:
* Authenticate the site administrator with their TechNXT account.
* Load organizations and chatbot widgets for selection.
* Load the TechNXT widget script and related assets (logo images, widget JS) on the admin and/or storefront.
* Power AI chat replies for website visitors through the TechNXT widget.

What data is sent and when:
* On admin login: the administrator's email and password are sent to the TechNXT App URL (`/api/auth/login`) so the plugin can obtain a session.
* After login (admin only): authenticated API requests are sent to list organizations and chatbots, using the stored session cookie.
* On storefront pages where the widget is enabled: the browser loads `technxt-widget.js` (and the widget UI) from the TechNXT App URL. Chat messages typed by visitors are sent to TechNXT so the AI can reply.
* If "Enable visitor recognition" is turned on: the logged-in customer's name and email may be passed to the widget for personalization. This is off by default and controlled by the site administrator.
* Admin screens may load a TechNXT-hosted logo image from the App URL.

This service is provided by TechNXT:
* Terms of Service: https://technxt.co/terms
* Privacy Policy: https://technxt.co/privacy

== Installation ==
1. Upload the plugin folder to the `/wp-content/plugins/` directory, or upload the zip via the WordPress admin Plugins screen.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to **TechNXT AI** in the left menu.
4. Enter your TechNXT App URL and sign in with your TechNXT account email and password.
5. Select your **Organization** (property) and **Widget** (chatbot) from the dropdowns.
6. Click **Use selected widget** — the chatbot is now live on your store.

== Frequently Asked Questions ==
= Where do I find my TechNXT App URL? =
It is the base URL of your TechNXT SaaS instance, e.g. `https://app.technxt.co`.

= What credentials do I use to log in? =
The same email and password you use to log in to the TechNXT dashboard.

= Does the plugin track visitors? =
The chat widget only appears after you connect a TechNXT account and activate a widget. Visitor recognition (passing logged-in customer name/email to the widget) is optional and disabled until you enable it under Privacy Options.

= Can I use a custom trigger button instead of the floating bubble? =
Yes — disable the Launcher Icon in Visibility Options and use the shortcode `[technxt_chat_trigger]Chat with us[/technxt_chat_trigger]` on any page or widget.

== Changelog ==
= 2.0.1 =
* Documented TechNXT external service usage, data sent, and links to Terms and Privacy Policy.
* Aligned text domain with the plugin slug (`technxt-ai-chat-assistant`).
* Enabled SSL verification on outbound TechNXT API requests.

= 2.0.0 =
* Replaced manual Chatbot ID entry with a full login flow (email + password).
* Added Organization (property) and Widget dropdowns.
* Added Visibility Options tab with URL exclusion patterns and toggle controls.
* Added Privacy Options tab with visitor recognition and JS API Key field.
* Added Save Changes AJAX for all tabs.
* Removed embedded dashboard iframe.

= 1.0.0 =
* Initial Release.
