=== Infowave WhatsApp – WhatsApp Business API, Chat Button & WooCommerce Notifications ===
Contributors: infowave
Tags: whatsapp, whatsapp business api, woocommerce, whatsapp chat, order notifications
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Official WhatsApp Business API for WordPress: floating WhatsApp chat button, shortcode and automatic WooCommerce order messages via Infowave.

== Description ==

Connect your WordPress site to the official WhatsApp Business API (Meta Cloud API) through [Infowave](https://wa.infowaveit.com).

* **WhatsApp chat button** – floating button (left or right) with a pre-filled message, plus the `[infowave_whatsapp_button]` shortcode.
* **WooCommerce order notifications** – send a Meta-approved template when an order is placed and when it is completed. Works with classic and block checkout. Runs in the background so checkout stays fast.
* **Smart phone numbers** – the country calling code is taken from the billing country, so international numbers work.
* **Opt-in** – optional "Send me order updates on WhatsApp" checkbox on the classic checkout.
* **Order notes** – every send, and every failure with its reason, is logged on the order.
* **No duplicates** – each message is sent at most once per order.

= Placeholders for template parameters =

`{first_name}` `{last_name}` `{order_number}` `{order_total}` `{order_status}` `{order_date}` `{payment_method}` `{site_name}`

Anything else is sent as typed.

= External service =

This plugin sends data to the Infowave WhatsApp API (`https://wa.infowaveit.com`) only when you enable a feature that needs it:

* the customer's phone number, name and email, and
* the template parameters for WooCommerce messages.

Data is sent over HTTPS using your API token. Service terms and privacy policy: https://wa.infowaveit.com/terms-and-policies

The chat button only links to `https://wa.me/` and sends no data from your site.

== Installation ==

1. Upload the `infowave-whatsapp` folder to `/wp-content/plugins/`, or upload the ZIP in Plugins → Add New → Upload.
2. Activate the plugin.
3. Go to **Settings → Infowave WhatsApp** and enter your Vendor UID and API token. Find them in Infowave → Settings → API Access & Webhook.
4. Enable the chat button and/or the WooCommerce messages, and enter your approved template names.
5. Use **Send a test message** to check the connection.

== Frequently Asked Questions ==

= Do I need an Infowave account? =
For WooCommerce messages, yes – sign up at https://wa.infowaveit.com. The chat button works without one.

= Why was a message not sent? =
Open the order and read the order note. Common causes:

* the template name or language is wrong,
* the template is not yet approved by Meta, or
* the phone number is invalid.

= Does it work with the block checkout? =
Yes, order messages work. The opt-in checkbox is shown on the classic checkout only. If you require opt-in, customers using the block checkout will not receive messages.

== Changelog ==

= 1.0.0 =
* First release: chat button, shortcode, WooCommerce new/completed order templates, test message.
