=== Xpev Messaging for WooCommerce ===
Contributors: xpev
Tags: whatsapp, woocommerce, order notifications, whatsapp business, meta cloud api
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automatic WhatsApp order notifications through your OWN Meta Cloud API account. No gateway, no monthly fees, no per-message markup.

== Description ==

Send automatic WhatsApp messages to your customers when their order is received or completed — directly through your own **Meta WhatsApp Cloud API** account.

Unlike gateway-based plugins, there is **no intermediary service**: you connect your own free Meta Business account and pay only Meta's official per-conversation rate, billed by Meta directly to you. The plugin itself adds nothing on top.

**Free features**

* Order notifications for **all order statuses** — Processing, Completed, On Hold, Cancelled, Refunded and Payment Failed
* Store owner WhatsApp alert on new orders
* Full template variable control — map every {{n}} to any of 17 order data fields, or write custom text with {placeholders}
* Customer opt-in consent (GDPR-friendly) on registration and My Account
* Guest order policy control
* Message log with per-order history
* Local phone format handling with configurable default country code
* One-click connection test
* WooCommerce HPOS compatible

**Pro features** (separate upgrade, not included in this plugin)

* Abandoned order reminder (pending payment recovery) — scheduled automation
* Review request N days after completion — scheduled automation
* Delivery tracking — delivered / read / failed statuses via Meta webhook
* Quick message & one-click resend from the order edit screen

== Installation ==

1. Install and activate the plugin (WooCommerce required).
2. Create a free Meta App with the WhatsApp product at developers.facebook.com.
3. Copy your Phone Number ID and generate a permanent System User access token.
4. Enter both under Xpev Messaging → Settings and click "Test Connection".
5. Create a message template in Meta's WhatsApp Manager, then map its variables on the Order Notifications tab.

== Frequently Asked Questions ==

= Do I need a paid gateway or SaaS account? =
No. The plugin connects directly to Meta's official Cloud API with your own free Meta Business account.

= What does sending cost? =
Only Meta's official per-conversation rate for your country, billed by Meta to you. The plugin adds no fees.

= Why are templates required? =
WhatsApp only delivers pre-approved template messages outside the 24-hour customer service window. This is a Meta platform rule.

= Does it change my checkout page? =
No. The optional consent checkbox appears on the registration form and My Account page only.

== External Services ==

This plugin connects to the Meta (Facebook) Graph API at graph.facebook.com to send WhatsApp messages on your behalf. This is the plugin's core purpose and happens only after you enter your own Meta API credentials.

What is sent and when: when an order notification is triggered, the customer's phone number and the template parameter values you configured (such as first name, order number, order total) are sent to Meta's API using your own access token. A connection test sends only your credentials to verify them.

This service is provided by Meta Platforms, Inc.: [Terms of Service](https://www.whatsapp.com/legal/business-terms), [Privacy Policy](https://www.facebook.com/privacy/policy).

No data is ever sent to the plugin author or any other third party.

== Screenshots ==

1. API Connection settings with one-click connection test
2. Order notification cards with template parameter mapping
3. Message log with status badges
4. Customer consent controls

== Changelog ==

= 1.0.0 =
* Initial release.
