=== WACLoud Automation for WooCommerce ===
Contributors: ssswadhin, swadhinkhan
Tags: wacloud, whatsapp, woocommerce, otp, abandoned cart
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.5.7
License: GPLv2 or later

WACLoud WhatsApp automation for WooCommerce order notifications, OTP verification, abandoned cart reminders, logs, resend, and webhooks.

== Description ==

This plugin integrates WordPress/WooCommerce with the WACLoud API.

Features:

* WACLoud API settings and device lookup.
* Modern dashboard with message stats, OTP stats, cart stats, and instance status.
* Test WhatsApp message from wp-admin.
* WooCommerce new order and order status notifications.
* Admin WhatsApp alerts.
* Pending payment reminders.
* After-purchase follow-up messages.
* WooCommerce checkout phone OTP verification.
* Optional WhatsApp number validation before OTP.
* Abandoned cart capture and scheduled reminders.
* Message templates/placeholders inside WordPress.
* Per-template media URL attachments.
* WooCommerce order media attachments: first product image, invoice PDF when an invoice plugin/filter provides a URL, or both.
* Message logs, resend, and message status check.
* REST webhook endpoint for WACLoud delivery/inbound events.
* Basic bulk campaign sender for manual phone lists, WordPress users, and WooCommerce customers.

== Installation ==

1. Upload the plugin ZIP from WordPress Admin > Plugins > Add New > Upload Plugin.
2. Activate the plugin.
3. Go to WACLoud > Settings.
4. Add your WACLoud API key and load/select the default instance ID.
5. Enable the features you want.

== API Notes ==

The plugin uses the confirmed WACLoud endpoints:

* POST /send-message
* GET /devices
* GET /message-status/{message_id}

It also falls back to POST /v1/messages/send for message sending if /send-message is unavailable.

== External services ==

This plugin connects to the WACLoud API service to send WhatsApp messages, validate WhatsApp numbers, load connected device/instance details, and check message delivery status.

When these features are used, the plugin sends the configured WACLoud API key, selected instance/device ID, recipient phone numbers, message content, optional media URLs, WooCommerce order/cart/customer placeholder values included in message templates, checkout OTP codes for verification messages, and message IDs for status checks. Data is sent only when an administrator sends a test message or bulk campaign, a configured WooCommerce notification/reminder runs, a customer requests checkout phone verification, an abandoned cart reminder runs, or an administrator checks/resends a log item.

Service provider: WACLoud

Terms of Service: https://wacloud.app/terms-conditions/

Privacy Policy: https://wacloud.app/privacy-policy/

== Changelog ==

= 0.2.0 =
* Changed default API base URL to https://pro.wacloud.app/api.
* Added instance dropdown/device status, dashboard overview, checkout OTP resend timer, verified tick state, async OTP dispatch, and order media attachment options.

= 0.2.1 =
* Added guided checkout re-verification when the billing phone no longer matches the verified WhatsApp phone.
* Added guided customer verification improvements.

= 0.2.2 =
* Added WACLoud > Release Channel to publish update ZIPs and manifest JSON into a public downloads folder.

= 0.2.3 =
* Added the current plugin version to the WACLoud dashboard overview.

= 0.2.4 =
* Removed the Release Channel item from the WACLoud admin menu.

= 0.2.5 =
* Removed the Release Channel admin page and publish handler from the plugin.

= 0.2.6 =
* Hid internal webhook details from the API settings screen.

= 0.2.7 =
* Added chart-style dashboard and logs visuals for message outcomes, activity, and status breakdowns.

= 0.2.8 =
* Fixed WACLoud header action button alignment on dashboard-style admin pages.

= 0.2.9 =
* Added pagination and a show-per-page selector to the message logs screen.

= 0.2.10 =
* Fixed WACLoud header actions being pushed far right/down by WordPress admin notices.

= 0.3.0 =
* Added switch-style feature toggles and multi-slot reminders/templates for abandoned cart, pending payment, and after-purchase follow-ups.

= 0.3.1 =
* Added a WACLoud summary chart widget to the main WordPress admin Dashboard.

= 0.3.2 =
* Fixed top dashboard spacing caused by third-party admin notices inside the WACLoud header.

= 0.3.3 =
* Added repeatable admin phone number fields with add/remove controls.

= 0.3.4 =
* Improved responsive behavior across WACLoud admin pages for desktop, tablet, and mobile.

= 0.3.5 =
* Improved message logs readability with a cleaner toolbar, status badges, context pills, trimmed message IDs, and polished action buttons.

= 0.3.6 =
* Added pagination, show-per-page controls, CSV export, and cleaner table styling to the Abandoned Carts screen.

= 0.3.7 =
* Added a Buy/Upgrade WACLoud button to the dashboard header.

= 0.3.8 =
* Updated the WACLoud admin UI buttons, accents, charts, and soft backgrounds to WhatsApp green color combinations.

= 0.3.9 =
* Added WACLoud branded logo and smile icon assets across the admin dashboard, settings, logs, hero area, and menu icon.

= 0.4.0 =
* Modernized the Bulk Campaign screen and added targeting for product purchasers, order date ranges, order status, and abandoned carts.
* Added Buy/Upgrade WACLoud actions across the main plugin admin pages.

= 0.4.1 =
* Added recent campaign history with in-progress, done, scheduled, and failed status labels plus pagination and show-per-page controls.

= 0.4.2 =
* Added full message preview popups and media indicators to message logs.
* Attached order media to the main order notification message instead of sending separate attachment messages.

= 0.4.3 =
* Fixed feature switch labels so Enabled and Disabled match the actual toggle state.

= 0.4.4 =
* Improved the Bulk Campaign layout and made filters update based on the selected audience.

= 0.4.5 =
* Fixed the WACLoud WordPress admin menu icon so it remains clear in the active sidebar state.

= 0.4.6 =
* Fixed the Admin Phones add/remove controls on the settings screen.

= 0.4.7 =
* Added date range controls across bulk campaign audiences and applied them to users, orders, products, and abandoned carts.

= 0.4.8 =
* Added inline media previews to the message log preview modal for images, video, audio, and PDFs.

= 0.4.9 =
* Updated the WordPress admin sidebar menu icon to a WhatsApp-style brand icon.

= 0.5.0 =
* Added an Active Package panel to the WACLoud dashboard with package, duration, status, and remaining time when returned by the WACLoud API.

= 0.5.1 =
* Fixed Active Package detection so device creation dates and connection status are not mistaken for package details.

= 0.5.2 =
* Removed the Active Package dashboard panel because WACLoud does not return reliable package details through the available API responses.

= 0.5.3 =
* Fixed Plugin Check findings for input sanitization, nonce handling, translator comments, CSV output, and custom-table SQL annotations.

= 0.5.4 =
* Fixed additional Plugin Check findings for sanitized checkout and campaign inputs, custom-table SQL annotations, WooCommerce meta query annotations, and the tested-up-to header.

= 0.5.5 =
* Fixed the remaining Plugin Check warning for bulk campaign product selection input handling.
* WordPress.org build removes the private self-hosted updater.

= 0.5.6 =
* Updated the WordPress.org build text domain to match the assigned plugin slug.

= 0.5.7 =
* Added WordPress.org review corrections for WooCommerce dependency metadata, external service disclosure, enqueued admin scripts, contributor ownership, and the WordPress.org-safe checkout-only OTP flow.
