=== Diagnostic Support Widget for Certorix ===
Contributors: certorix, jaumartang
Tags: support, widget, helpdesk, chatbot, woocommerce
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed the Certorix AI diagnostic support widget on any WordPress site. Zero-code setup. Shortcode + Gutenberg block + WooCommerce support.

== Description ==

**Certorix** turns your support documentation into an interactive AI diagnostic tree. Customers resolve issues step-by-step without waiting for an agent.

= Key features =

* **One-click install** — enter your Organization ID and you're live
* **Auto-embed** — widget appears on every front-end page automatically
* **Shortcode** — `[certorix_widget]` for precise placement on any page or post
* **Gutenberg block** — drag-and-drop with live color preview in the editor
* **WooCommerce** — auto-detects product context on product pages
* **Multilingual** — passes WordPress site language to the widget automatically
* **VNT-certified facts** — AI answers backed by Ed25519-signed product facts

= How it works =

1. Sign up at [certorix.online](https://certorix.online)
2. Build your diagnostic trees and publish them
3. Copy your Organization ID from Settings → Widget Generator
4. Paste it in WordPress → Settings → Certorix
5. Enable auto-embed or add `[certorix_widget]` to any page

= Requirements =

* A Certorix account (free tier available)
* PHP 7.4 or higher
* WordPress 6.0 or higher

== Installation ==

1. Upload the `certorix` folder to `/wp-content/plugins/`
2. Activate the plugin in **Plugins → Installed Plugins**
3. Go to **Settings → Certorix** and enter your Organization ID
4. Enable **Auto-embed** or add `[certorix_widget]` to a page

== Frequently Asked Questions ==

= Where do I find my Organization ID? =

Log in to [app.certorix.online](https://app.certorix.online), go to **Settings → Widget Generator**, and copy the `organizationId` value.

= Does the widget work with WooCommerce? =

Yes. When auto-embed is enabled, the widget on product pages automatically receives the product name as a context hint, allowing the AI to suggest more relevant diagnostic trees.

= Can I change the widget colors, label, or theme? =

Yes. All appearance settings (colors, logo, launcher label, opening message, theme…) are managed directly in your [Certorix dashboard](https://certorix.online/widget) and applied automatically. No need to touch the WordPress plugin settings.

= Does it slow down my site? =

No. The widget script is loaded with `defer` and only activates when a customer clicks the launcher. Zero impact on Core Web Vitals.

= What data does the plugin send? =

The plugin embeds a JavaScript widget that communicates directly with the Certorix API. No PHP HTTP requests are made by the plugin itself. See the [Privacy Policy](https://certorix.online/privacy) for details.

== External Services ==

This plugin connects to the **Certorix API** (api.certorix.online) to:

1. Load the widget script: `https://api.certorix.online/widget/v1/widget.portal.js`
2. Serve AI-powered diagnostic sessions, verified facts, and helpdesk ticket creation.

The connection is made **client-side** (in the visitor's browser), only when the widget is active on the page. The plugin itself makes no server-side HTTP requests.

**What is sent:** the Organization ID you configured, the visitor's question or answers during a diagnostic, and (if the visitor submits a ticket) their name and email address.

**When it is sent:** only when a visitor interacts with the widget. No data is sent on page load or when the widget is not active.

* Certorix Terms of Service: https://certorix.online/legal/terms
* Certorix Privacy Policy: https://certorix.online/legal/privacy

== Screenshots ==

1. **Settings page** — Enter your Organization ID, configure auto-embed and launcher appearance.
2. **Widget in action** — The AI diagnostic widget open on a customer-facing page, guiding a user step by step.
3. **Gutenberg block** — Drag the Certorix Widget block into any page with live preview in the editor.
4. **Shortcode** — Use `[certorix_widget]` in any Classic Editor page or widget area.

== Changelog ==

= 1.0.0 =
* Initial release
* Shortcode [certorix_widget]
* Gutenberg block certorix/widget
* wp-admin Settings page
* WooCommerce product context support
* Auto-embed via wp_footer hook

== Upgrade Notice ==

= 1.0.0 =
Initial release.
