=== Order Chat for WooCommerce ===

Contributors: fuentes7
Tags: woocommerce, whatsapp, orders, cart
Requires at least: 5.2
Tested up to: 7.0
Requires PHP: 7.0
Stable tag: 1.3.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send WooCommerce cart and product details to WhatsApp using a prefilled message link.

== Description ==

Order Chat for WooCommerce adds WhatsApp buttons to the WooCommerce cart, product lists, and product detail pages.

The plugin does not connect to the WhatsApp API and does not send messages automatically. It creates a WhatsApp link with a prefilled message. When a customer clicks the button, WhatsApp opens and the customer decides whether to send the message.

Available options:

* Compact country code selector and local WhatsApp phone number field.
* Grouped button color control with color picker and hexadecimal text input.
* Grouped border radius control with synchronized slider, number input, and pixel unit.
* Cart message and button label.
* WhatsApp cart button support for classic WooCommerce cart and WooCommerce Cart Block.
* Toggle controls for hiding the default WooCommerce checkout button and clearing the cart.
* Optional product inquiry buttons for product lists and single product pages.

== External Services ==

This plugin links to WhatsApp at `https://api.whatsapp.com/send` when a customer clicks a WhatsApp button.

The generated link may include the configured phone number and a prefilled message containing cart product names, quantities, prices, total, product titles, or product URLs, depending on the button clicked. The customer reviews and sends the message manually in WhatsApp.

WhatsApp is a service provided by Meta Platforms, Inc. See WhatsApp's Terms of Service and Privacy Policy:

* https://www.whatsapp.com/legal/terms-of-service
* https://www.whatsapp.com/legal/privacy-policy

== Privacy ==

This plugin does not collect, store, or transmit personal data by itself.

When a customer clicks a WhatsApp button, the browser opens WhatsApp with a prefilled message. The message is not sent until the customer sends it from WhatsApp.

== Installation ==

= Install Order Chat for WooCommerce from within WordPress =

1. Visit Plugins > Add New in your WordPress dashboard.
2. Search for `Order Chat for WooCommerce`.
3. Click Install Now.
4. Activate the plugin from the Plugins screen.
5. Go to Settings > WOO for WhatsApp.
6. Configure the country code, WhatsApp number, messages, and button display options.

= Install Order Chat for WooCommerce manually =

1. Upload the `chat-orders-for-woo` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the Plugins screen in WordPress.
3. Go to Settings > WOO for WhatsApp.
4. Configure the country code, WhatsApp number, messages, and button display options.

== Frequently Asked Questions ==

= Does this plugin integrate with the WhatsApp API? =

No. It creates a WhatsApp link with a prefilled message. The customer sends the message manually from WhatsApp.

= Does the plugin create WooCommerce orders? =

No. It sends the cart details as a WhatsApp message. WooCommerce checkout and order creation remain separate.

= Can I hide the default WooCommerce checkout button? =

Yes. Enable the checkout button option in the plugin settings.

= Do I need to add the country code in the phone number field? =

No. Select the country code in the country selector and enter only the local WhatsApp number.

== Screenshots ==

1. Plugin settings with tabs.
2. Settings to display the button on the cart page.
3. Settings to display the button in the store.
4. Settings to display the button in the product details.
5. Preview on the cart page.
6. Preview on the store page.
7. Preview in product details.
8. Preview of the product inquiry message and shopping cart on WhatsApp.

== Changelog ==

= 1.3.0 =
* Added safe default settings to prevent PHP warnings before options are saved.
* Added settings sanitization and escaped output.
* Improved WhatsApp message URL generation.
* Added nonce protection for the optional cart clearing action.
* Moved frontend styles and scripts into enqueued assets.
* Added horizontal tabs for settings sections.
* Added synchronized grouped color picker and hexadecimal color input.
* Added synchronized grouped border radius slider and pixel input.
* Added compact country code selector and local WhatsApp number field.
* Added searchable country dropdown with flag indicators.
* Added toggle-style controls for checkbox settings.
* Added support for showing the WhatsApp cart button in WooCommerce Cart Blocks.
* Added automatic country detection from the WooCommerce store country when available, with WordPress locale fallback.
* Added compatibility handling for the previous full-number setting.
* Updated plugin headers, text domain, readme, and WordPress compatibility metadata.

= 1.2.2 =
* Previous public release.
