=== ComturkAI Automated AI Chatbot for Web ===
Contributors: comturk, cemkosmaz1
Tags: chatbot, ai chat, live chat, customer support, automation
Requires at least: 5.0
Tested up to: 6.9
Stable tag: 1.4.5
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add an AI-powered chatbot to your WordPress site that automatically learns from your content and answers visitor questions instantly.

== Description ==

**ComturkAI Web Chat** transforms your WordPress website into an intelligent, self-service support hub. Our AI chatbot automatically crawls and learns from your website content, then answers visitor questions accurately - 24/7, without any manual training required.

= Key Features =

* **One-Click Setup** - Sign in with Google and your chatbot is ready in minutes
* **Automatic Content Learning** - AI crawls your pages and learns your content automatically
* **Smart AI Responses** - Powered by advanced AI to give accurate, contextual answers
* **Beautiful Chat Widget** - Modern, customizable chat interface that matches your brand
* **Live Chat Handoff** - Seamlessly transfer to human agents when needed
* **Free Tier Available** - Get started with 20 AI conversations per month at no cost

= How It Works =

1. **Install & Activate** - Install the plugin and activate it
2. **Sign In** - Authenticate with your Google account (one click)
3. **Auto-Crawl** - We automatically crawl your website pages
4. **Go Live** - Your AI chatbot appears on your site, ready to help visitors

= Use Cases =

* **Customer Support** - Answer common questions automatically
* **Lead Generation** - Engage visitors and capture contact information
* **E-commerce** - Help shoppers find products and get answers
* **Documentation** - Make your help docs conversational and accessible
* **Booking & Services** - Guide visitors to the right services

= Why Choose ComturkAI? =

* **No Training Required** - Unlike other chatbots, you don't need to manually create Q&A pairs
* **Always Up-to-Date** - Re-crawl anytime to keep your chatbot current
* **Privacy Focused** - Your data stays secure with enterprise-grade encryption
* **Multilingual** - Supports conversations in multiple languages

== Installation ==

= Automatic Installation =

1. Go to **Plugins > Add New** in your WordPress admin
2. Search for "ComturkAI Web Chat"
3. Click **Install Now** and then **Activate**
4. Follow the setup wizard to connect your account

= Manual Installation =

1. Download the plugin ZIP file
2. Go to **Plugins > Add New > Upload Plugin**
3. Choose the ZIP file and click **Install Now**
4. Activate the plugin and follow the setup wizard

== Frequently Asked Questions ==

= Is there a free plan? =

Yes! Our free tier includes 20 AI conversations per month, perfect for small websites and testing.

= Do I need to train the chatbot? =

No! Our AI automatically crawls your website and learns from your existing content. No manual training required.

= What languages does the chatbot support? =

The AI can understand and respond in multiple languages, including English, Turkish, German, French, Spanish, and more.

= Can I customize the chat widget appearance? =

Yes, you can customize colors and positioning to match your website's design.

= What happens when the AI can't answer a question? =

The chatbot can collect visitor contact information and notify you, or hand off to a live human agent if you have that configured.

= Is my data secure? =

Yes, we use enterprise-grade encryption and follow GDPR compliance standards. Your content is only used to train your specific chatbot.

= Can I re-crawl my website after updates? =

Yes! You can trigger a re-crawl anytime from the plugin settings to update the AI with your latest content.

== Screenshots ==

1. Setup Wizard - Easy one-click Google sign-in
2. Dashboard - Monitor your chatbot performance
3. Chat Widget - Beautiful, modern chat interface on your website
4. Settings - Customize your chatbot behavior

== Changelog ==

= 1.3.9 =
* Fix: Allowed data-token and other attributes in widget script injection

= 1.3.8 =
* Fixed prefix naming convention - changed from "rag_" to "comturkai_" (4+ characters required)
* Added plugin owner "cemkosmaz1" to Contributors list

= 1.3.7 =
* Updated compatibility for WordPress 6.9

= 1.3.6 =
* Added esc_url() escaping for admin URLs to satisfy WordPress.org security requirements

= 1.3.5 =
* Fixed URL encoding issue in JavaScript redirects causing setup wizard loops

= 1.3.4 =
* Fixed JavaScript redirect URL escaping

= 1.3.3 =
* Fixed activation redirect loop

= 1.3.2 =
* Fixed admin menu slug for settings page

= 1.3.1 =
* Fixed JavaScript URL encoding issues in setup wizard

= 1.3.0 =
* Fixed all WordPress.org security and internationalization issues
* Ensured all output is properly escaped
* Corrected text domain and placeholder usage

= 1.4.5 =
* Fix: Recrawl now automatically refreshes expired tokens instead of requiring manual disconnect
* Fix: Disconnect Account now uses AJAX with a fallback link for maximum reliability
* Fix: Handle cases where WordPress AUTH_KEY/SECURE_AUTH_KEY salts change after token storage

= 1.4.4 =
* Follow-up release to fix Disconnect Account interaction on upgraded sites

= 1.4.3 =
* Follow-up release for the latest reconnect, disconnect flow, and widget preference fixes

= 1.4.2 =
* Preserve widget enabled preference when the plugin is deactivated and reactivated
* Store refresh tokens in the OAuth callback fallback flow for more reliable session renewal
* Show a clear reconnect instruction when a stored refresh token can no longer renew the session
* Make Disconnect Account use a dedicated admin action and redirect cleanly back to setup

= 1.4.1 =
* Added automatic access token refresh and retry for protected API calls
* Fixed dashboard recrawl to trigger a real crawl job instead of only showing a notice

= 1.4.0 =
* Integrated widget provisioning into setup flow
* Widget is now created automatically during initial setup
* All setup steps (company, subscription, team, widget) are now atomic
* Improved reliability and reduced setup failures
* Removed dependency on separate widget provisioning step

= 1.2.0 =
* Improved security with proper input sanitization
* Enhanced internationalization support

= 1.1.0 =
* Improved auto-mapping of crawled files for RAG responses
* Better error handling during setup
* Production-ready URL configuration
* Enhanced OAuth flow reliability

= 1.0.0 =
* Initial release
* Google OAuth authentication
* Automatic website crawling
* AI-powered chat responses
* Chatwoot integration for live chat
* Free tier with 20 conversations/month

== Upgrade Notice ==

= 1.1.0 =
This version improves the reliability of the AI chatbot responses. Update recommended for all users.

== Additional Info ==

For support, documentation, and pricing information, visit [www.comturk.com](https://www.comturk.com)

* [Documentation](https://chat.comturk.com/docs)
* [Support](https://chat.comturk.com/support)
* [Pricing](https://chat.comturk.com/price)

