=== ZapOrder – Pedidos no Chat e Catálogo for WooCommerce ===
Contributors: wooglobalapps
Tags: whatsapp, pedidos, catalogo, click-to-chat, woocommerce-whatsapp
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.5.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Receive WooCommerce orders on WhatsApp: product button, cart to chat, floating button and catalog mode. Free click-to-chat, no API required.

== Description ==

= Em português =

**ZapOrder** transforma a sua loja WooCommerce em uma máquina de pedidos pelo WhatsApp em dois minutos: botão "Pedir pelo WhatsApp" na página do produto (com variação, quantidade, preço e link na mensagem), envio do carrinho inteiro pelo WhatsApp, botão flutuante de chat em todas as páginas, modo catálogo (sem carrinho e sem checkout) e opção de esconder preços para "pedir orçamento". Textos, cores e modelos de mensagem personalizáveis. Usa o link oficial wa.me: sem API, sem mensalidade, funciona com WhatsApp e WhatsApp Business. Gratuito.

Most small stores in Brazil, Latin America, India, Spain and Portugal close their sales on WhatsApp. **ZapOrder** turns your WooCommerce store into a WhatsApp ordering machine in two minutes.

**Free features**

* **Order on WhatsApp button** on product pages. The message already includes the product, the selected variation (size, color…), quantity, price and link.
* **Send cart via WhatsApp**: the customer sends the full cart (items, quantities and total) to you in one tap. Works with the classic cart and the new Cart block.
* **Floating WhatsApp chat button** on every page.
* **Catalog mode**: remove "Add to cart" and checkout. Customers order only through WhatsApp.
* **Hide prices** for "ask for a quote" stores.
* Buttons on shop and category pages.
* Custom button texts, color and message templates with placeholders: `{product}` `{qty}` `{price}` `{sku}` `{url}`.
* Uses the official `wa.me` link: no API, no monthly WhatsApp fee, works with WhatsApp and WhatsApp Business.
* **WhatsApp Automation (optional, 30 free messages/month)**: connect your WhatsApp by QR Code directly in **WooCommerce → ZapOrder WhatsApp → Automation** to send automatic order-status notifications (Processing, Completed, On hold, Cancelled) and pending Pix reminders (compatible with QRecebe and CheckoutBR).
* **Generate with AI**: describe what you want (a setting, a design change, texts, a custom feature) in the plugin screen and the AI assistant answers in the same chat.
* Compatible with HPOS and the Cart/Checkout blocks.
* Translation ready.

*ZapOrder is an independent plugin developed by WooGlobal Apps and is not affiliated with, sponsored by, or endorsed by WhatsApp, Meta, or WooCommerce.*

== External services ==

By default, all core click-to-chat ordering features (product button, cart to WhatsApp, floating chat button and catalog mode) use plain `wa.me` links and make **zero** external requests to our servers.

External services are contacted **only** when a store administrator explicitly opts in on one of the two optional tabs in **WooCommerce → ZapOrder WhatsApp**:

1. **WooGlobal Apps Service (`https://conexao-support.vercel.app`)**
   * **"Generate with AI" tab (opt-in by administrator):** when an administrator clicks **Send**, the plugin transmits the typed support message, site URL, store name, site language, plugin version, and optional email address so a reply can be returned inside the same tab.
   * **"Automation" tab — connection & quota (opt-in by administrator):** when an administrator clicks **Connect WhatsApp**, the plugin sends the site URL, store name, and plugin version to register a site token, generate a WhatsApp QR Code, check connection status, and track monthly message quota (30 free messages/month; 5,000/month with an optional Pro license).
   * **"Automation" tab — order notifications & pending Pix reminders (opt-in by administrator):** when WhatsApp is connected and the administrator enables automatic order-status notifications or pending Pix reminders, the plugin sends the following customer/order data to `conexao-support.vercel.app` (which relays delivery through its messaging gateway) strictly to deliver the configured WhatsApp message: customer first/last name, customer billing or mobile phone number, order number, order status, ordered item names and quantities, order total, store name, and the Pix copy-and-paste code (when applicable for pending Pix reminders).
   * **"Automation" tab — Direct WhatsApp order modal (opt-in by administrator, disabled by default):** when enabled by the administrator and submitted by a shopper on the storefront, the plugin sends the shopper's entered name, WhatsApp phone number, optional note, store name, and the selected product/cart text to `conexao-support.vercel.app` to deliver the order confirmation message to the shopper (and optionally to the store WhatsApp number).
   * **"Automation" tab — Pro license verification (opt-in by administrator):** when an administrator enters a license key (`WG-XXXX-XXXX-XXXX-XXXX`) and clicks **Activate license**, the plugin sends the license key and site URL to `conexao-support.vercel.app` to verify the active Pro quota.
   * **Uninstall:** when the plugin is deleted, it sends a cleanup request to delete the site's chat thread and disconnect/remove its WhatsApp automation instance.
   * Terms: https://wooglobal-apps.vercel.app/terms.html — Privacy policy: https://wooglobal-apps.vercel.app/privacy.html

2. **WooGlobal Apps Pro Checkout (`https://wooglobal-apps.vercel.app`)**
   * Plain external link opened only if an administrator chooses to view or subscribe to the optional ZapOrder Pro plan (5,000 automated WhatsApp messages/month). No data is sent automatically by the plugin to this URL.

== Support & free setup ==

ZapOrder works fully on its own: every feature is free and nothing is locked or required.

If you want a hand, the plugin screen (**WooCommerce → ZapOrder WhatsApp**) has a **Generate with AI** tab (see "External services"), a **Help** tab with quick tips and a **Hire us** tab. The "Talk to us on WhatsApp" and "Hire on WhatsApp" buttons are plain links: they open WhatsApp with a short message that contains only the plugin name and version (or the service you clicked). Nothing is sent automatically and no store data is shared.

* **Free setup:** we install and configure ZapOrder on your store for free.
* **Custom work** (optional): automatic order-status messages, abandoned cart recovery via WhatsApp, multiple agents / department routing, custom button and message design. See [our services](https://wooglobal-apps.vercel.app/br/contratar.html?plugin=zaporder).
* Questions and bug reports: [support forum](https://wordpress.org/support/plugin/zaporder/).

== Installation ==

1. Install and activate WooCommerce.
2. Upload the `zaporder` folder to `/wp-content/plugins/` or install it from **Plugins → Add New**.
3. Activate ZapOrder.
4. Go to **WooCommerce → ZapOrder WhatsApp**, enter your number with country code (e.g. 5511999998888) and save.

== Frequently Asked Questions ==

= Do I need the WhatsApp Business API? =

No. ZapOrder uses the free `wa.me` click-to-chat link. Any WhatsApp or WhatsApp Business number works.

= Does it work with variable products? =

Yes. The message includes the selected attributes, quantity and the variation price. If no option is selected, the customer is asked to choose one first.

= Can I disable the normal checkout? =

Yes. Turn on **Catalog mode**: the Add to cart buttons and the checkout page are removed, and customers order through WhatsApp.

= Does it collect any data? =

By default, core `wa.me` click-to-chat buttons make zero requests to our servers. Data is transmitted to `conexao-support.vercel.app` only if a store administrator explicitly opts in to the optional **Generate with AI** tab or the optional **Automation** tab (which sends order/customer details strictly to deliver the configured WhatsApp messages, as detailed in "External services" above).

= What can I ask in "Generate with AI"? =

Anything related to your store and this plugin: settings, design changes, texts and translations, or a custom feature. The answer appears in the same chat, usually within a few hours.

== Screenshots ==

1. Order on WhatsApp button on the product page.
2. Cart sent to WhatsApp with items and total.
3. Settings page with the free setup help card.
4. Hire us tab: free installation and implementation services on WhatsApp.

== Changelog ==

= 1.5.1 =
* Updated plugin display name to comply with WordPress.org trademark guidelines.
* Clarified all opt-in data transmitted by the optional Automation and Direct Order features in External services and FAQ.
* Kept Pro upgrade prompts strictly inside ZapOrder's own admin pages (removed the global WP Admin quota notice).

= 1.5.0 =
* Added **ZapOrder Pro License** activation card directly inside **WooCommerce → ZapOrder WhatsApp → Automation** (unlocks 5,000 automated WhatsApp messages/month with a `WG-XXXX-XXXX-XXXX-XXXX` license key).
* Replaced external gateway upgrade links with WooGlobal Apps Stripe Checkout pages (`/br/pro.html` and `/en/pro.html`) featuring 3D Secure card verification.
* Added a Pro status/upgrade bar inside ZapOrder admin tabs and a dismissible quota reminder notice when Free usage reaches 80%+.
* Updated Portuguese (Brazil) translations and documentation.

= 1.4.0 =
* New optional **Direct WhatsApp order** mode on the Automation tab: when WhatsApp is connected, clicking "Order on WhatsApp" on product or cart pages lets customers enter their name and WhatsApp and automatically receive the order message in their chat (with optional copy to the store number and automatic fallback to `wa.me`).

= 1.3.2 =
* Removed custom headers (`X-WP-Token` and `Idempotency-Key`) that were rejected by WordPress Playground's CORS proxy, keeping `Authorization: Bearer` plus `_wp_token` query authentication and JSON `idempotency_key`.

= 1.3.1 =
* Added proxy-safe site token fallback (`X-WP-Token` header and `_wp_token` query parameter) so WhatsApp QR Code connection and Generate with AI work in WordPress Playground and restrictive hosts that strip `Authorization` headers.

= 1.3.0 =
* New optional **Automation** tab: connect your WhatsApp by QR Code and get 30 free automated messages per month.
* Automatic WooCommerce order-status WhatsApp notifications for Processing (paid), Completed, On hold and Cancelled orders, with customizable templates (`{order_id}`, `{customer_name}`, `{total}`, `{status}`, `{store_name}`, `{items}`).
* Automatic pending Pix reminder: schedules a one-time WhatsApp reminder for unpaid Pix orders (QRecebe or any gateway with "pix" in its ID or title), including the Pix copy-and-paste code when available.
* Phone number extraction compatible with WooCommerce `billing_phone` and CheckoutBR `_billing_cellphone`, with configurable default country code (DDI).
* Built-in test message sender in the Automation tab and updated Portuguese (Brazil) translations.

= 1.2.3 =
* Fixed numeric SKUs with leading zeros when reading `data-sku` in the product button script.
* Updated Portuguese (Brazil) translations for the cart SKU and unit/subtotal lines.
* Updated support links and AI assistant triage copy.

= 1.2.2 =
* Cart WhatsApp message now includes each item's dynamic SKU (including product variations), unit price and line subtotal — works in both Classic Cart and Cart Block.
* Variable product pages now also fill the selected variation's SKU dynamically when `{sku}` is used in the product message template.

= 1.2.1 =
* Plugin name, tags and description now use the Portuguese terms Brazilian stores search for (pedidos pelo WhatsApp, botão flutuante, catálogo). No functional changes.

= 1.2.0 =
* Generate with AI tab: describe what you need and the AI assistant answers in the plugin screen.

= 1.1.0 =
* Welcome screen, Help and Hire us tabs, free setup help links, pt_BR translation; new plugin name.

= 1.0.0 =
* First release.
