=== WAlenz for WooCommerce ===
Contributors: walenz
Tags: whatsapp, woocommerce, order notifications, whatsapp business, sri lanka
Requires at least: 6.0
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

Order updates on WhatsApp, through the official WhatsApp Business Platform: confirmations, payment, shipping and cancellation messages, new-order alerts for your team, and your customers in your WAlenz contacts.

== Description ==

WAlenz sends approved WhatsApp templates from your own WhatsApp Business number when something happens to an order.

* **Order updates**: a template for each order status (processing, completed, on hold, cancelled, refunded, failed, and statuses other plugins add).
* **New-order alerts**: your team gets a WhatsApp message for every new order.
* **Notes to customers**: notes you add to an order for the customer go out on WhatsApp too.
* **Opt-in at checkout**: a "Send me order updates on WhatsApp" box. Customers who tick it become subscribed contacts in WAlenz, tagged "WooCommerce", ready for your campaigns.
* **Never twice**: every send has an idempotency key, so a retry never sends the same update twice.
* **In the background**: sending runs in WooCommerce's Action Scheduler, so checkout never waits.
* Each send (or the reason it failed) is written as an order note.

Placeholders for template variables: {first_name}, {last_name}, {order_number}, {order_total}, {order_status}, {order_date}, {order_items}, {payment_method}, {shipping_method}, {billing_city}, {customer_phone}, {order_url}, {shop_name}, {note}.

== Installation ==

1. In WAlenz, connect your WhatsApp number and get your order templates approved (for example "order_confirmed" with {{first_name}} and {{order_number}}).
2. In WAlenz → Developer → API keys, make a key with "Send messages", "Read templates" and "Add and change contacts".
3. Upload this plugin in WordPress (Plugins → Add New → Upload Plugin) and activate it.
4. Go to WooCommerce → Settings → WAlenz, paste the key and save: you'll see your workspace name and messages left.
5. Open "Order messages", turn on the events you want, choose a template for each, and fill its variables, one per line:

    body.first_name = {first_name}
    body.order_number = {order_number}

== Frequently Asked Questions ==

= Does it work with the block checkout? =
Order updates and team alerts do. The opt-in box is added to the classic checkout; with the block checkout, turn off "Only customers who ticked it" if you collect consent another way.

= Who pays for WhatsApp messages? =
Meta charges for template messages on your own WhatsApp Business account; your WAlenz plan sets how many messages you can send each month.

== Changelog ==

= 1.0.0 =
* First release.
