=== HelpJet ===
Contributors: helpjet, richardlong, chrishadley
Tags: chatbot, ai, support, live chat, help desk
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add an AI support chatbot to your site in minutes. Connect to HelpJet, pick your bot, and it goes live as a widget, block, or shortcode.

== Description ==

[HelpJet](https://helpjet.com/?utm_source=wprepo&utm_medium=link&utm_campaign=helpjet) lets you train an AI chatbot on your own docs and content, then answer your visitors' questions automatically.

This plugin connects your WordPress site to your HelpJet bot:

* **Floating chat widget** — shown site-wide, toggle it from Settings → HelpJet.
* **Inline chat** — drop the *HelpJet Chat* block into any page, or use the `[helpjet]` shortcode (optional `height` attribute, e.g. `[helpjet height="500px"]`).

Setup is a single click: hit **Connect to HelpJet**, sign in (or create a free account), pick or create a bot, and you're sent straight back with everything wired up. Training, appearance, and behaviour are all managed from the HelpJet dashboard — the plugin stays out of your way.

= External services =

This plugin relies on the HelpJet platform (a third-party service) to work:

* When connected, your site loads the chat interface from `app.helpjet.com`, and messages your visitors type into the chat are sent to HelpJet to generate answers. Page URL and browser information may accompany those requests, as with any embedded script.
* During setup, your site's URL and name are sent to HelpJet so the connection can be established. When you disconnect or uninstall, the plugin notifies HelpJet so the connection record is closed.
* No data is sent to HelpJet until you connect your site.

HelpJet is operated by HelpJet: [terms of service](https://helpjet.com/terms-of-service), [privacy policy](https://helpjet.com/privacy-policy).

== Installation ==

1. Install and activate the plugin.
2. Go to **Settings → HelpJet** and click **Connect to HelpJet**.
3. Sign in or create a free HelpJet account, pick or create a bot, and you'll be returned to your site — connected.

== Frequently Asked Questions ==

= Do I need a HelpJet account? =

Yes — a free account is enough to get started. You can create one during the connect flow.

= Where do I train and configure my bot? =

In the HelpJet dashboard. The plugin deliberately keeps configuration on WordPress minimal: connecting/disconnecting and a widget on/off switch.

= Can I put the chat inside a page instead of the floating widget? =

Yes. Use the *HelpJet Chat* block or the `[helpjet]` shortcode. The floating widget can be switched off under Settings → HelpJet if you only want inline chat.

= Can I hide the floating widget on certain pages? =

Yes. Return `false` from the `helpjet_show_widget` filter for the requests where it should not appear, e.g. `add_filter( 'helpjet_show_widget', fn( $show ) => ! is_page( 'checkout' ) );`.

= Will the chat slow my site down? =

No. The chat loads asynchronously after your page has rendered, and nothing is loaded at all until you connect your site.

= Is the plugin available in my language? =

The plugin is fully translation-ready. Translations are contributed by the community at [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/helpjet/) and delivered automatically as language packs.

= What happens when I uninstall the plugin? =

All plugin options are deleted and HelpJet is notified so the site connection is closed. Your bot and its training data remain untouched in your HelpJet account.

== Screenshots ==

1. Settings → HelpJet: connect your site to HelpJet in one click.
2. The floating chat widget answering a visitor on your site.
3. Inline chat placed in a page with the HelpJet Chat block.

== Changelog ==

= 1.2.0 =
* Readme refresh: expanded FAQ (hiding the widget on specific pages, performance, translations) and updated screenshot captions ahead of the WordPress.org listing.

= 1.1.10 =
* Plugin review: removed the bundled .po/.mo/JSON translation catalogs. Translations are now provided by the WordPress.org community via translate.wordpress.org and delivered as language packs; only the source helpjet.pot ships with the plugin.
* Connect flow hardening: the anti-CSRF state is now stored per user (with a 15-minute expiry) instead of in a site-wide transient, so only the administrator who started the connection can complete it; the outbound redirect to HelpJet uses wp_safe_redirect() with the app host allow-listed.
* Admin-only options (connection ID, connected-at, activation notice) are no longer autoloaded on every request; the notice-dismiss AJAX handler returns a JSON response; the legacy-plugin warning also detects network-activated plugins on multisite; both loaders now carry the plugin version as a cache-buster.

= 1.1.9 =
* Plugin review: all JavaScript and CSS is now loaded through the WordPress enqueue API instead of inline tags — the inline embed loader and its admin fallback styles are enqueued (new assets/embed.css), the activation-notice dismiss handler moved to assets/admin.js with its nonce passed via wp_add_inline_script(), and both loaders use the WordPress 6.3+ async script strategy.

= 1.1.8 =
* Removed the Author URI plugin header (optional, and required to differ from the Plugin URI by the WordPress.org submission checks).

= 1.1.7 =
* Plugin renamed to simply "HelpJet".

= 1.1.6 =
* Updated bundled French, German, and Spanish translations — all strings now translated.

= 1.1.5 =
* Inline embed: when the chat does not load (most commonly because the Page Embed channel is disabled for the bot), administrators now see an explanatory fallback in place of the empty container, linking to the bot's Deploy → Page Embed settings.

= 1.1.4 =
* Added a "See Chat Widget on Site" button next to Save Changes on Settings → HelpJet, linked to the widget's enabled status — jump straight to your site to see the widget live.

= 1.1.3 =
* Checking and implementing fixes per Plugin Check (PCP): removed the manual load_plugin_textdomain() call — WordPress.org language packs load translations automatically since WP 4.6.

= 1.1.2 =
* Refreshed bundled translation catalogs.

= 1.1.1 =
* Initial release: connect flow, floating widget, HelpJet Chat block, [helpjet] shortcode.
* Dismissible post-activation notice pointing to Settings → HelpJet to get set up.
* Translation ready: all strings translatable, bundled English, French, German, and Spanish translations (text domain `helpjet`).
* Suggested privacy-policy text registered with the WordPress privacy-policy guide (Settings → Privacy), covering the data shared with HelpJet.
* Guideline review pass: legacy-plugin warning scoped to the Plugins and Settings → HelpJet screens; requires WordPress 6.3+ (block API v3).
* Code formatted to the WordPress Coding Standards (PHPCS `WordPress` ruleset, zero violations).
