=== Ipira AI Chat Widget ===
Contributors: godevtechnologies
Tags: chat, ai, chatbot, customer support, lead generation
Requires at least: 5.8
Tested up to: 7.0
Stable tag: 1.1.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add an AI-powered chat widget to your WordPress site that automatically answers customer questions 24/7.

== Description ==

Ipira is an AI-powered chat assistant that learns from your knowledge base and answers customer questions automatically — 24 hours a day, 7 days a week.

**How it works:**
* Upload your documents, FAQs, and website content to Ipira
* Your AI assistant learns from your knowledge base
* Visitors ask questions and get instant, accurate answers
* High-intent visitors are automatically identified as leads

**Features:**
* AI answers questions using your own documents and website content
* Automatic lead capture — detects high-intent visitors and collects contact info conversationally
* Fully customizable widget — colors, position, welcome message, FAQ quick questions
* Works on all pages automatically
* Test Connection button verifies your Widget Key instantly
* JavaScript API — open the widget from any button or link on your site
* No coding required

**Requirements:**
* An active Ipira account ([start your free 14-day trial](https://ipira.io))
* Your Widget Key from your Ipira dashboard

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/ipira-chat-widget/` or install through the WordPress plugin screen
2. Activate the plugin through the Plugins screen in WordPress
3. Go to **Ipira Chat** in your WordPress dashboard sidebar
4. Log in to your [Ipira dashboard](https://ipira.io) and copy your Widget Key
5. Paste your Widget Key into the settings page and click **Test Connection** to verify
6. Click **Save Settings**
7. Visit your website — the chat widget will appear automatically on every page

== Frequently Asked Questions ==

= Where do I find my Widget Key? =
Log in to your Ipira dashboard at ipira.io, select your website, and click Embed Code in the sidebar. You will see a copy button to grab just the Widget Key.

= Do I need an Ipira account? =
Yes. The plugin connects your WordPress site to your Ipira AI assistant. [Start a free 14-day trial](https://ipira.io) — credit card required, no charge until after the trial ends.

= Will the widget slow down my site? =
No. The widget script loads asynchronously and has no impact on your page load speed or Core Web Vitals.

= Can I disable the widget without deactivating the plugin? =
Yes. Go to Ipira Chat in your dashboard sidebar and uncheck "Show the chat widget on all pages."

= How do I know my Widget Key is working? =
Use the Test Connection button on the settings page. It will confirm your key is valid and show you which website and company it is connected to.

= Can I open the widget from a button on my site? =
Yes. Use the JavaScript API included with the widget script:

  <button onclick="window.IpiraChat?.open({ message: 'I need a free estimate' })">
    Get a Free Estimate
  </button>

You can pre-fill any message to give visitors a head start in the conversation.

= Can I place the widget on specific pages only? =
The widget loads on all pages by default. Use the enable/disable toggle in the plugin settings to turn it off, then manually add the widget to specific pages using your theme or page builder.

= Where is my customer data stored? =
All data is stored securely in your Ipira account. See [ipira.io/privacy](https://ipira.io/privacy) for details.

== Screenshots ==

1. The Ipira Chat settings page in the WordPress dashboard sidebar
2. The Test Connection button confirming a valid Widget Key
3. The chat widget on a live website
4. Lead capture in action

== Changelog ==

= 1.1.0 =
* Added JavaScript API (window.IpiraChat) — open the widget programmatically from any button or link
* Added window.IpiraChat.open(), close(), and isOpen() methods
* Support for pre-filling a message when opening the widget

= 1.0.1 =
* Fixed script registration to use wp_enqueue_script() per WordPress standards
* Fixed nonce verification in settings AJAX handler
* Updated tested up to WordPress 7.0

= 1.0.0 =
* Initial release
* Widget Key validation with Test Connection button
* Enable/disable toggle
* Shortcode support [ipira_chat]
* Open Ipira Dashboard button

== Upgrade Notice ==

= 1.1.0 =
Adds JavaScript API so you can open the chat widget from any button or link on your site.

= 1.0.1 =
Security and compatibility fixes. Recommended for all users.

= 1.0.0 =
Initial release.