=== Coheto Orders Chat - For WooCommerce ===
Contributors: coheto
Tags: woocommerce, whatsapp, checkout, orders, chat
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.1
WC requires at least: 8.2
WC tested up to: 11.3
Stable tag: 1.1.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

WhatsApp for WooCommerce – Automatically connect customers to WhatsApp after checkout with a pre-filled order confirmation message.

== Description ==

Coheto Orders Chat - For WooCommerce redirects customers to WhatsApp after they complete their WooCommerce purchase. This allows store owners to confirm orders, answer questions, and improve post-checkout communication.

Developed by **SoftCoheto** (the software development division of Coheto), the plugin is lightweight, has zero frontend jQuery dependency, and only loads on the WooCommerce order confirmation (thank you) page.

= Key Features =

* Automatic WhatsApp redirect after order completion with configurable delay (including 0 seconds for immediate redirect)
* Customizable message template with order variables (customer name, order number, total, products, billing/shipping address, payment method)
* Live message preview and instant Test Connection button in the settings page
* Fallback button displayed if automatic redirect is disabled or blocked by popup blockers
* Compatible with mobile devices (WhatsApp app) and desktop (WhatsApp Web)
* Customizable texts for title, message, countdown, button label, and fallback help
* Local order counter stored as order metadata in your WordPress database
* Compatible with WooCommerce High-Performance Order Storage (HPOS) and Cart & Checkout Blocks
* Developer-friendly filters for extending messages, phone routing, URLs, and button markup

= Pro Version =

Unlock additional conversion features with **Coheto Orders Chat Pro - For WooCommerce**, available at [softcoheto.com](https://softcoheto.com):

* Conditional WhatsApp message templates by payment method
* Direct "Order / Quote via WhatsApp" buttons on Single Product and Cart pages (Classic & Cart Block)
* Checkout Page WhatsApp Support Button with live cart & customer details
* Exit-Intent Cart Recovery Modal for desktop and mobile shoppers

= How It Works =

1. Customer completes checkout on your WooCommerce store
2. The order confirmation page loads
3. Coheto Orders Chat - For WooCommerce prepares a WhatsApp message with order details
4. Customer is redirected automatically or can click the fallback button
5. Store owner receives the order details directly in WhatsApp

= Developer Hooks =

The plugin provides four core filters plus admin tab hooks for extensions:

* `coheto_orders_whatsapp_message` – Customize the formatted WhatsApp message
* `coheto_orders_whatsapp_phone` – Customize the destination WhatsApp phone number
* `coheto_orders_whatsapp_url` – Customize the generated WhatsApp URL
* `coheto_orders_button_html` – Customize the rendered WhatsApp button HTML
* `coheto_orders_admin_tabs` / `coheto_orders_render_admin_tab` – Register additional tabs inside WooCommerce → WhatsApp Orders

== Installation ==

= Requirements =

* WordPress 6.5 or higher (tested up to 6.7)
* WooCommerce 8.2 or higher (tested up to 11.3)
* PHP 8.1 or higher (PHP 8.2, 8.3, or 8.4 recommended)

= Automatic Installation =

1. Go to WordPress admin → Plugins → Add New
2. Search for "Coheto Orders Chat - For WooCommerce"
3. Click "Install Now" and then "Activate"
4. Go to WooCommerce → WhatsApp Orders to configure

= Manual Installation =

1. Download the plugin ZIP file
2. Go to WordPress admin → Plugins → Add New → Upload Plugin
3. Choose the ZIP file and click "Install Now"
4. Activate the plugin
5. Go to WooCommerce → WhatsApp Orders to configure

= Configuration =

1. Select your country code and enter your WhatsApp number (without leading zero)
2. Customize your message template using the available variables
3. Click "Test Connection" to verify your WhatsApp number before saving
4. Configure redirect behavior (enable/disable automatic redirect, delay, and texts)
5. Save settings and test with a real order

== Frequently Asked Questions ==

= Does this work with all WooCommerce orders? =

Yes, it works with standard WooCommerce orders on both classic and block-based checkout confirmation pages.

= Will this slow down my site? =

No. The plugin only loads its lightweight CSS and Vanilla JavaScript on the WooCommerce order confirmation page.

= Does it work on mobile devices? =

Yes. It opens the WhatsApp app on mobile devices and WhatsApp Web on desktop.

= What happens if automatic redirect is blocked by a browser? =

The plugin detects blocked popups, highlights the fallback button, and lets customers manually open WhatsApp.

= Is customer data sent to external servers? =

No data is sent to SoftCoheto, Coheto, or third-party servers by the plugin itself. The WhatsApp message is opened directly in the customer's browser or WhatsApp app. See the Privacy Policy section for details on local metadata and optional Google Analytics events.

= Is it compatible with HPOS? =

Yes. Coheto Orders Chat - For WooCommerce fully supports WooCommerce High-Performance Order Storage (HPOS).

== Screenshots ==

1. WhatsApp redirect screen displayed after checkout with countdown and fallback button
2. Order received page with visible "Send order via WhatsApp" button
3. WhatsApp configuration settings page in WordPress admin
4. Redirect and button customization settings panel

== Changelog ==

= 1.1.0 - 2026-11-20 =
* Added unified tabbed navigation hooks (`coheto_orders_admin_tabs` / `coheto_orders_render_admin_tab`) so Pro tabs integrate directly inside WooCommerce → WhatsApp Orders
* Updated documentation and official links to softcoheto.com
* Updated naming capitalization to "Coheto Orders Chat - For WooCommerce"
* Updated minimum requirements to WordPress 6.5+, WooCommerce 8.2+, and PHP 8.1+ (tested up to WordPress 6.7, WooCommerce 11.3, and PHP 8.4/8.5)
* Added automatic `filemtime()` cache-busting for admin and frontend assets

= 1.0.0 - 2026-02-25 =
* Initial release of Coheto Orders Chat - For WooCommerce
* Automatic WhatsApp redirect on order confirmation with 0–20s configurable delay
* Customizable message templates with order variables and live preview
* Fallback button with popup-blocker detection and dark mode support
* Mobile and desktop compatibility
* Local HPOS-compatible order counter
* Internationalization ready (i18n)
* HPOS and Cart & Checkout Blocks compatibility

== Upgrade Notice ==

= 1.1.0 =
Unified settings tab integration for Pro add-on, SoftCoheto links, and updated PHP 8.1+ / WordPress 6.7 / WooCommerce 11.3 compatibility.

== Privacy Policy ==

Coheto Orders Chat - For WooCommerce does not collect, store, or transmit personal customer data to external SoftCoheto or Coheto servers. All order message formatting happens locally within your WordPress installation.

* **Local order metadata:** The plugin records timestamps in local WooCommerce order metadata (`_coheto_orders_auto_redirected` and `_coheto_orders_sent`) to prevent duplicate automatic redirects and display a local processed-orders count. All plugin options and metadata are deleted when the plugin is uninstalled.
* **Optional Google Analytics (`gtag`) event:** If your site already loads Google Analytics (`gtag`), clicking the manual WhatsApp button triggers a client-side `click` event (`event_category: "CohetoOrders"`, `event_label: "WhatsApp Manual Click"`). No personal customer data or order details are included in this event.

== Support ==

For documentation, Pro add-on purchases, and support, visit https://softcoheto.com
