=== HEAT Chatfuel Integration ===
Contributors: taicv
Tags: chatbot, chatfuel, json, jsonapi
Requires at least: 4.7.0
Tested up to: 6.8
Stable tag: 1.0.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Connect your website with Chatfuel Chatbot seamlessly with powerful JSON data from posts or products.

== Description ==

This plugin provides seamless integration between your WordPress website and Chatfuel chatbots through JSON APIs and Customer Chat Plugin functionality.

**Key Features:**

* **Customer Chat Plugin Integration**: Embed Chatfuel chat widget on your website footer without editing theme files
* **JSON API Endpoints**: Provide data sources to your chatbot including:
	* Posts and products by category
	* Search functionality by keyword
	* WooCommerce product integration
* **Easy Configuration**: Simple admin interface for setup and management

**API Endpoints Available:**
* `/wp-json/chatfuel/post/category/{category}/{offset}` - Get posts by category
* `/wp-json/chatfuel/post/keyword/{keyword}/{offset}` - Search posts by keyword  
* `/wp-json/chatfuel/product/category/{category}/{offset}` - Get WooCommerce products by category
* `/wp-json/chatfuel/product/keyword/{keyword}/{offset}` - Search WooCommerce products by keyword

**Requirements:**
* WordPress 4.7.0 or higher
* For WooCommerce features: WooCommerce plugin installed

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/heat-chatfuel-integration` directory, or install the plugin through the WordPress admin screen
2. Activate the plugin through the 'Plugins' screen in WordPress
3. Use the Settings -> Chatfuel screen to configure the plugin

== Frequently Asked Questions ==

= How do I get my Chatfuel embed code? =

Access your Chatbot in the Chatfuel Dashboard, go to the Grow Section to find your embed code.

= Does this work with WooCommerce? =

Yes, the plugin includes WooCommerce integration for product data endpoints.

= How do I test the API endpoints? =

Use the interactive endpoint builder in the admin settings to generate and test API URLs. 

== Screenshots ==

[screenshots tab]

== Changelog ==

= 1.0.1 =
* Fixed PHP warnings when accessing array offsets on false values
* Added proper safety checks for missing plugin options
* Updated WordPress compatibility to version 6.8
* Improved error handling in admin settings and public display
* Enhanced stability when plugin options are not set

= 1.0.0 =
* Initial release
* Customer Chat Plugin integration
* JSON API endpoints for posts and products
* Admin settings page with configuration options

