=== mk4web Notifier for WooCommerce ===
Contributors: mk4web
Tags: whatsapp, notifications, orders, otp, messaging
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send WhatsApp notifications for WooCommerce orders, admin alerts, OTP verification, and contact forms via the WaNoti messaging service.

== Description ==

**WaNoti** connects your WordPress site to [WaNoti](https://wanoti.net/) so you can send WhatsApp messages to customers and store owners. WooCommerce order alerts are supported when WooCommerce is installed; OTP and contact-form alerts work on any site with a WaNoti plan.

= External service required =

This plugin **does not send WhatsApp messages by itself**. You must:

1. Create a free account at [wanoti.net](https://wanoti.net/)
2. Connect your WhatsApp number in the WaNoti dashboard (QR scan)
3. Copy your API key into **WaNoti → Settings** in WordPress

Without an API key, the plugin only shows setup screens and does not transmit data.

= What data is sent to WaNoti =

When configured, the plugin may send the following to `wanoti.net` servers:

* Your site URL, WordPress version, and plugin version (hourly heartbeat)
* API key (stored in your database, sent as `X-Api-Key` header)
* Order notifications (when WooCommerce is active): order ID, status, customer name, phone, email, totals, and line items you enable
* Admin alert phone numbers and message content from your templates
* OTP verification phone numbers when checkout/login OTP is enabled
* Contact form fields (name, phone, email, message) when admin contact notifications are enabled

See [WaNoti Privacy](https://wanoti.net/privacy) and [Terms](https://wanoti.net/terms). The plugin adds suggested privacy policy text under **Settings → Privacy**.

= Features =

* WhatsApp message templates (Arabic/English presets)
* Message logs with resend
* Optional WooCommerce order status notifications (customer + store owner)
* Optional WhatsApp OTP at checkout or login (WooCommerce checkout when WC is active)
* Contact Form 7 / WPForms admin alerts (optional)

= WhatsApp trademark =

WhatsApp is a trademark of WhatsApp LLC. This plugin is not affiliated with or endorsed by WhatsApp or Meta.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/wanoti/` or install from the WordPress.org directory.
2. Activate the plugin through the **Plugins** screen.
3. Sign up at [wanoti.net](https://wanoti.net/register), connect WhatsApp, and copy your API key.
4. In WordPress go to **WaNoti → Settings**, paste the API key, and save.
5. Configure events under **WaNoti → Notifications** and review templates under **WaNoti → Templates**.
6. For order alerts, install and activate **WooCommerce**.

== Frequently Asked Questions ==

= Do I need WooCommerce? =

No. WooCommerce is optional and unlocks order status notifications and checkout OTP. Templates, logs, OTP shortcodes, and contact-form alerts can be used without WooCommerce depending on your WaNoti plan.

= Do I need a paid plan? =

A free trial is available. Paid plans add higher message limits and features. Billing is handled on wanoti.net, not inside this plugin.

= Where are messages sent from? =

From the WhatsApp number you connect in your WaNoti dashboard. The plugin calls the WaNoti API; delivery uses your linked session.

= Does the plugin phone home? =

Yes. With an API key saved, an hourly heartbeat sends site URL and version info to register your install and check connection status. No heartbeat runs without an API key.

= How do I stop all communication? =

Delete the API key in **WaNoti → Settings** or deactivate/uninstall the plugin. Uninstall removes plugin options and scheduled events.

== Screenshots ==

1. Dashboard with connection status, usage stats, and quick actions
2. Notification event toggles for customers and store owners
3. Message templates editor
4. Message logs with delivery status

== Changelog ==

= 1.1.2 =
* Remove plan-based gate from Message Logs page — all features fully functional without account tier check
* Replace raw style echo with wp_add_inline_style() for admin menu icon
* Remove customTemplates/analytics plan flags from JS localization

= 1.1.1 =
* Fix setup screen 404 when visiting /wp-admin/wanoti-setup (redirects to admin.php?page=wanoti-setup)
* Fix oversized admin sidebar icon (proper 20px menu icon)
* Setup page always registered while hidden after completion

= 1.1.0 =
* WordPress.org release preparation: readme, privacy policy, uninstall cleanup, security hardening
* Renamed user-facing copy (WaNoti Dashboard); WooCommerce optional, not required
* Plugin branding icon and stats dashboard improvements

== Upgrade Notice ==

= 1.1.1 =
Fixes setup page URL and admin menu icon size.

= 1.1.0 =
Recommended update. WooCommerce is optional; install WooCommerce only if you need order notifications.
