=== InvexTalk Order Notifications for WooCommerce ===
Contributors: invexcore
Tags: woocommerce, whatsapp, notifications, order notifications, chatbot
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connects WooCommerce order status updates to InvexTalk WhatsApp Notification Platform and Live Chatbot widget.

== Description ==

InvexTalk Order Notifications for WooCommerce connects your WooCommerce store to the InvexTalk WhatsApp Notification Platform.

Whenever an order status changes (e.g., Completed, Processing, Pending, Cancelled), this plugin securely notifies the InvexTalk webhook API to trigger instant WhatsApp notifications to your customers and admin alerts to store owners.

== Features ==

* Seamless integration with WooCommerce order status updates.
* Customizable Order Status selection (choose which status updates trigger WhatsApp notifications).
* Instant WhatsApp Admin Alerts for store owners on every new order.
* Optional InvexChat.js Live Chatbot widget integration.
* Automatically formats customer phone numbers with international country calling codes.
* Uses native WordPress HTTP API (`wp_remote_post`) for secure webhook delivery.
* Native WooCommerce logger support (`WC_Logger`).

== External Services ==

This plugin connects to external 3rd-party services provided by InvexTalk / Invexcore to deliver automated order notifications and render an optional live chat widget:

1. **InvexTalk WhatsApp Notification Webhook API**
   * **Service Purpose**: Receives order status updates from your WooCommerce store to send automated WhatsApp notifications to customers and store administrators.
   * **Data Transmitted**: Order ID, order status, order total amount, currency code, customer billing first & last name, email address, formatted phone number, billing city, billing country, ordered item names, quantities, and line item totals.
   * **Frequency & Trigger**: Data is sent via HTTP POST request (`wp_remote_post`) only when an order status changes to one of the administrator-selected order statuses in settings.
   * **Service Links**: 
     - Service URL: [InvexTalk Integration Platform](https://talk.invexcore.com)
     - Terms of Service: [InvexTalk Terms of Service](https://talk.invexcore.com/page/conditions-generales-dutilisation-cgu)
     - Privacy Policy: [InvexTalk Privacy Policy](https://talk.invexcore.com/page/confidentialite)

2. **InvexChat Live Chatbot Script**
   * **Service Purpose**: Optional floating live chat widget loaded in your site footer to allow store visitors to initiate WhatsApp chat conversations.
   * **Data Transmitted**: Public widget identification key (`data-key`) and visitor interaction data.
   * **Frequency & Trigger**: Script is enqueued on front-end store pages only when enabled by the site administrator in settings.
   * **Service Links**:
     - Terms of Service: [InvexTalk Terms of Service](https://talk.invexcore.com/page/conditions-generales-dutilisation-cgu)
     - Privacy Policy: [InvexTalk Privacy Policy](https://talk.invexcore.com/page/confidentialite)

== Installation ==

1. Upload the `invextalk` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Navigate to `InvexTalk` in your WordPress admin dashboard menu.
4. Enter your InvexTalk Integration Token (retrieved from your InvexTalk Dashboard).
5. (Optional) Enter your Admin WhatsApp Phone Number and select enabled order statuses.
6. Click Save Changes.

== Frequently Asked Questions ==

= Where do I find my Integration Token? =

Log into your InvexTalk dashboard, navigate to Dashboard > Integrations > WooCommerce, and copy your integration token.

= Is WooCommerce required? =

Yes, this plugin is an extension designed specifically for WooCommerce stores.

= How do Admin Notifications work? =

Enter your WhatsApp phone number with international country code (e.g. +229...) in the Admin Phone setting. You will receive an instant WhatsApp alert whenever a customer places an order.

== Changelog ==

= 1.1.1 =
* Updated: Updated assets, images, and branding assets for InvexTalk.

= 1.1.0 =
* Renamed: Updated display name and slug to `InvexTalk Order Notifications for WooCommerce` (`invextalk`) for official branding.
* Improved: Moved all inline styles into enqueued `assets/css/admin.css` stylesheet via `admin_enqueue_scripts`.
* Added: Documented external services and endpoints under `== External Services ==` in `readme.txt` with Terms of Service and Privacy Policy links.
* Fixed: Enhanced Webhook payload delivery and anti-collision anti-spam pacing.

= 1.0.0 =
* Initial release.
