=== Aisk – AI Powered Chatbot | Support Assistant | Support Bot | Live Chat ===
Contributors: aisk, zrshishir, ahmmedsabbirbd
Tags: chatbot, live chat, customer support, live support, woocommerce
Requires at least: 5.0
Tested up to: 6.8
Stable tag: 2.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI chatbot for WordPress & WooCommerce with WhatsApp & Telegram integration. Provides instant answers, product recommendations, order status, inquiry submit and much more.

== Description ==

Aisk is a revolutionary AI-powered WhatsApp & Telegram supported chatbot designed specifically for WooCommerce stores and WordPress websites. Say goodbye to repetitive support tickets and hello to automated, intelligent customer service that works around the clock.

= 🚀 Why Choose AISK? =

* AISK Chat is 100% FREE!
* Reduce support tickets by up to 80%
* Provide instant 24/7 customer support
* Free up your team's time for complex issues
* Increase customer satisfaction with quick responses
* Boost sales with intelligent product recommendations
* Seamlessly integrate with WhatsApp and Telegram
* Enhanced sitemap processing for better content discovery
* Improved URL handling and content extraction
* Advanced error handling and logging

= 🛍️ WooCommerce Integration =

AISK is built from the ground up for WooCommerce stores:

* **Smart Product Search**: Helps customers find products based on descriptions, colors, sizes, categories, and more
* **Order Management**: Customers can track orders, view status, and access invoices using their order number and email
* **Intelligent Recommendations**: Suggests relevant products based on customer queries and browsing history
* **Shopping Cart Assistance**: Helps with cart-related questions and checkout process
* **Real-time Inventory**: Provides accurate stock information and availability
* **Enhanced Content Discovery**: Improved sitemap processing for better product and content indexing

= 🔍 Content Processing =

* Let your chatbot answer from your website content, woocommerce products, as well as your PDF and external site URLs. All the data are processed right in your server. 

= 🎯 Key Features =

**Smart Customer Support**
* Instant responses to common customer queries
* Natural language understanding for human-like conversations
* Learning capability to improve responses over time
* Multi-language support
* Custom response templates
* Enhanced content discovery and processing

**Multi-Channel Integration**
* WhatsApp integration for direct messaging
* Telegram bot integration
* Contact form integration
* Email notification system
* Seamless channel switching
* Improved error handling across all channels

**Advanced Administration**
* Intuitive dashboard for managing conversations
* Detailed analytics and insights
* Customizable chat widget
* Knowledge base management
* Custom branding options
* Enhanced logging and monitoring

**Security & Privacy**
* GDPR compliant
* Secure data handling
* Advanced encryption
* Role-based access control
* Data retention policies
* Enhanced URL validation and sanitization

= 🔥 Features =

* Advanced WooCommerce integration
* WhatsApp and Telegram integration
* Custom branding and themes
* Advanced analytics and reporting
* Priority support
* Custom AI training
* Multiple language support
* Unlimited conversations

= 💡 Use Cases =

1. **Product Support**
    * Answer product-specific questions
    * Provide sizing guides
    * Share product recommendations
    * Handle availability inquiries

2. **Order Management**
    * Track order status
    * Handle shipping inquiries

3. **Customer Service**
    * Answer FAQs
    * Handle common support issues
    * Provide store policies
    * Collect customer feedback

4. **Sales Assistance**
    * Recommend products
    * Answer pricing questions
    * Handle discount inquiries
    * Guide through checkout

= 🔧 Easy Setup =

1. Install and activate the plugin
2. Enter your API credentials
3. Customize your chat widget
4. Configure your knowledge base
5. Start automating your customer support!

= 🌟 Benefits =

For Store Owners:
* Reduce support costs
* Increase customer satisfaction
* Boost sales through smart recommendations
* Save time on repetitive queries
* Get valuable customer insights

For Customers:
* 24/7 instant support
* Quick access to order information
* Personalized product recommendations
* Seamless shopping experience
* Multiple communication channels

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/aisk` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress
3. Use the Settings->AISK screen to configure the plugin
4. Configure your API credentials in the plugin settings

== Frequently Asked Questions ==

= Is AISK compatible with my theme? =

Yes, AISK is designed to work with any WordPress theme. The chat widget is fully responsive and customizable to match your site's design.

= Do I need coding knowledge to use AISK? =

No, AISK is designed to be user-friendly and requires no coding knowledge. The intuitive admin interface makes it easy to set up and manage.

= Can I customize the chatbot's responses? =

Yes, you can customize responses, train the AI with your specific knowledge base, and set up custom response templates.

= Does AISK support multiple languages? =

Yes, AISK supports multiple languages and can detect and respond in the customer's preferred language.

= Is AISK GDPR compliant? =

Yes, AISK is fully GDPR compliant and includes features for data privacy and protection.

== Screenshots ==

1. Modern chat widget interface
2. Admin dashboard overview
3. WooCommerce order management
4. WhatsApp integration
5. Analytics dashboard
6. Settings panel

== Changelog ==

= 1.2.3 =
This update improves time limit management by replacing the discouraged `set_time_limit()` function with WordPress filters. This change enhances compatibility with strict PHP settings and improves the reliability of long-running operations like PDF processing and URL crawling. No action required for existing installations.

= 1.2.2 =
This update fixes missing version parameters in style registrations, improving asset caching and loading reliability. No action required for existing installations.

= 1.2.1 =
* Removed obsolete PDF queue handler from backend
* Cleaned up and refactored frontend PDF processing
* Removed debug logging and improved code clarity
* Verified consistent PDF feature behavior
* Updated test cases and documentation

= 1.2.0 =
* All created_at and updated_at fields are now stored in UTC in the database using gmdate('Y-m-d H:i:s') for DATETIME columns, ensuring consistency across all server environments.
* Backend API always returns ISO 8601 UTC strings for all date fields.
* Frontend consistently displays all dates/times in the user's local timezone, regardless of server or database timezone.
* Improved documentation and developer notes for timezone handling.
* Fixed issues where local and staging environments could show different times due to inconsistent timezone storage.
* Fixed potential ambiguity in date parsing by always using UTC for storage and ISO 8601 for API responses.

### 1.1.9
- Added robust PDF queue processing system using Action Scheduler or fallback to WordPress cron
- Background PDF processing with retries, job status monitoring, and automatic cleanup
- REST API endpoints and React UI for PDF upload, status polling, and deletion
- Support for PDF processing with or without WooCommerce dependency
- Resource-efficient queue: batch size control, server load checks, and rate limiting
- Improved error handling and user feedback for PDF uploads and processing
- Automatic queue table creation and verification
- Hybrid dispatching: supports real cron, AJAX/manual triggers, and background jobs
- Optimized PDF processing workflow: upload → queue → background process → status tracking
- Enhanced PDF extraction, chunking, and embedding reliability
- Improved admin UI for PDF status, progress, and error messages
- Fixed issues with Action Scheduler dependency and fallback logic
- Improved reliability of PDF job status and queue cleanup
- Fixed linter errors and exception handling in PDF processing code

### 1.1.8
- Reverted PDF processing UI to a simple upload/process flow (removed polling/status logic)
- Fixed issues with PDF job status lookup and improved reliability of PDF uploads
- Improved error handling and user feedback for PDF uploads
- Minor bug fixes and code cleanup
- The inquiry page does not load if WooCommerce is not installed initially (1st time).

### 1.1.7
- Enhanced URL processing and validation for improved security
- Improved error handling and logging across all integrations
- Added better timezone support for chat timestamps
- Optimized database queries for faster performance
- Enhanced content discovery and processing capabilities

### 1.1.4
- Refactor uninstall script to simplify table drop query syntax
- Refactor WhatsApp handler for improved logging and code clarity
- Updated the from_number assignment to remove the 'whatsapp:' prefix for better compatibility.
- Cleaned up error logging in the handle_webhook method to enhance readability.
- Commented out the delay in media sending for potential future use, improving code maintainability.

### 1.1.3
- Telegram and WhatsApp chat integration improvements and bug fixes.
- User and admin chat timestamps now always display in the user's local time zone, with clear time zone indication.
- Product carousel and order inquiry flows improved in Telegram and WhatsApp bots.
- State management for inquiry submission in Telegram bot.
- Consistent date/time formatting across admin dashboard and chat widget.
- Enhanced error handling and logging for chat integrations.
- Fixed issue where inquiry submission in Telegram bot was not recognized.
- Fixed product image and content display issues in Telegram bot.
- Fixed admin dashboard date column always showing UTC instead of user local time.
- Fixed chat widget and chat history to always show timestamps in the user's local time zone.

### 1.1.2
- Added user-facing message when no subordinate URLs can be embedded (due to bot protection, caching, or JavaScript rendering)
- User notice is now shown in a dismissible yellow box above the form
- Improved frontend UX for user and system messages
- No changes to embedding logic for main page content
- Various UI/UX and accessibility improvements

### 1.1.1
- Enhanced chat widget performance and responsiveness
- Improved error handling and logging
- Added support for custom chat widget styling
- Fixed compatibility issues with latest WordPress versions
- Optimized database queries for better performance
- Added new integration options for third-party services
- Improved documentation and user guides
- Enhanced sitemap processing for better content discovery
- Improved URL handling and content extraction
- Advanced error handling and logging

### 1.0.0
- Initial release



== Upgrade Notice ==

= 2.0.0 =
This major version update brings significant performance improvements to PDF processing and content handling. Key enhancements include optimized memory management, advanced caching, and improved text extraction capabilities. The update also includes better error handling and resource management for large files. We recommend updating to this version for improved reliability and performance.

= 1.2.3 =
This update improves time limit management by replacing the discouraged `set_time_limit()` function with WordPress filters. This change enhances compatibility with strict PHP settings and improves the reliability of long-running operations like PDF processing and URL crawling. No action required for existing installations.

= 1.2.2 =
This update fixes missing version parameters in style registrations, improving asset caching and loading reliability. No action required for existing installations.

= 1.2.2 =
- ✅ Product image not showing sequential
- ✅ Unsupported image extension Manages

= 1.2.1 =
This update removes the PDF queue handler system and simplifies the PDF processing workflow. The changes include cleanup of backend code, improved frontend component organization, and verification of PDF functionality. No action required for existing installations.

= 1.2.0 =
This update ensures all date/time fields are stored and displayed consistently in UTC and the user's local timezone, fixing issues with inconsistent times across different servers. Update to 1.2.0 for robust, reliable date/time handling in all environments.

= 1.1.9 =
Added support for general inquiries intent type, enhanced intent classification system, improved response handling for store policies and business information, updated system prompt to better handle general inquiries, improved distinction between general conversation and information-seeking questions, enhanced response formatting for business-related queries, fixed intent classification accuracy for store policy questions, improved handling of business hours and shipping inquiries, enhanced response quality for general business information

= 1.1.8 =
This release reverts the PDF processing UI to a simpler, more reliable flow. If you previously used background polling/status for PDFs, please note this is no longer present. No data loss will occur.

= 1.1.7 =
Enhanced URL processing and validation, improved error handling, better timezone support, optimized database queries, and enhanced content discovery capabilities.

= 1.1.4 =
Refactor uninstall script to simplify table drop query syntax
Refactor WhatsApp handler for improved logging and code clarity
Updated the from_number assignment to remove the 'whatsapp:' prefix for better compatibility
Cleaned up error logging in the handle_webhook method to enhance readability
Commented out the delay in media sending for potential future use, improving code maintainability

= 1.1.3 =
Updated whatsapp chat, telegram and time zone of the main chatbot.

= 1.1.2 =
Added user-facing message when no subordinate URLs can be embedded (due to bot protection, caching, or JavaScript rendering)

= 1.1.1 =
Updated WooCommerce integration to include Enhanced Content Discovery

= 1.1.0 =
New features added to AISK - enhance content discovery and processing

= 1.0.0 =
Initial release of AISK - start automating your WooCommerce customer support today!

== Support ==

Visit [aisk.chat](https://aisk.chat) for documentation and support.