=== Notify CRM ===
Contributors: vestes
Tags: woocommerce, whatsapp, order-notifications, order-tracking, customer-communication
Requires at least: 5.8
Tested up to: 7.0
Stable tag: 1.0.0
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

WooCommerce order management with WhatsApp notifications — custom statuses, branded emails, courier tracking, and more.

== Description ==

**Notify CRM** adds powerful order management features to WooCommerce with WhatsApp integration, custom order statuses, branded transactional emails, courier tracking, and a floating WhatsApp button for your storefront.

= Key Features =

* **Custom Order Statuses** — Add statuses like "New Order", "Shipped", "Returned / RTO" with custom colors and workflow.
* **WhatsApp Message Queue** — Messages are queued when order status changes. Send them manually via wa.me with one click.
* **Bulk WhatsApp Actions** — Select multiple orders and send WhatsApp updates in bulk from the orders list.
* **Branded Emails** — Override WooCommerce transactional emails with custom subjects, headings, and branded HTML templates.
* **Courier Management** — Add your own courier services with tracking URL templates. Auto-detect tracking numbers from order notes.
* **Floating WhatsApp Button** — Add a WhatsApp contact button to your storefront with customizable position, color, and greeting message.
* **Phone Number Normalization** — Automatically formats phone numbers to international format for reliable WhatsApp delivery.
* **Admin Bar Notifications** — See pending message count in the WordPress admin bar at a glance.
* **Order Actions** — Send WhatsApp messages directly from the order edit screen with pre-filled templates.
* **Message Log** — Track all sent messages with status, date, and delivery method.

= How It Works =

1. When an order status changes (e.g., Processing → Shipped), Notify CRM queues a WhatsApp message.
2. You see pending messages in the admin bar and the Notify CRM dashboard.
3. Click to send — Notify CRM opens wa.me with the pre-filled message. Just hit send.
4. Branded emails are sent automatically for each status change.

= Who Is This For? =

WooCommerce store owners who want to:
- Keep customers informed via WhatsApp
- Use custom order statuses beyond WooCommerce defaults
- Send branded, professional order emails
- Track shipments with local courier services
- Add a WhatsApp contact button to their store

= Compatibility =

* WooCommerce 5.0+
* WordPress 5.8+
* PHP 7.2+
* Works with all themes that follow WooCommerce template standards

== Installation ==

1. Upload the `notify-crm` folder to `/wp-content/plugins/`
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to **Notify CRM** in the admin menu to configure your settings
4. Go to the **Store** tab and complete your registration (store name, email, WhatsApp number)
5. Customize order statuses in the Statuses tab
6. Configure WhatsApp message templates in the Notifications tab

== Frequently Asked Questions ==

= Does this plugin send WhatsApp messages automatically? =

No. The plugin queues messages when order status changes. You send them manually by clicking the "Send WhatsApp" button, which opens wa.me with the pre-filled message. You just press send.

= Do I need a WhatsApp Business API account? =

No. This plugin uses wa.me links to open WhatsApp Web or the WhatsApp app. No API account or third-party service needed.

= Will this work with my theme? =

Yes. Notify CRM works with any WooCommerce-compatible theme. It hooks into WooCommerce's order system and doesn't modify theme templates.

= Does it support RTL languages? =

The admin interface is LTR. WhatsApp messages work in any language including RTL since they are rendered by WhatsApp itself.

= Can I customize the WhatsApp message templates? =

Yes. Go to Notify CRM > Notifications tab to customize messages for each order status. You can use variables like {name}, {order_id}, {items}, {total}, {courier}, and {tracking_number}.

= Does this plugin contact any external server? =

Yes. When you complete your registration in the Store tab, Notify CRM sends your store details (store name, store URL, owner name, email address, and WhatsApp number) to the Notify CRM server (api.hustletoevolve.com) to register your store. The server is also contacted when you verify your plan status or delete your account. See the External Services section below for full details.

= Will it slow down my site? =

No. Notify CRM only loads its admin scripts on its own settings pages and the WooCommerce order screens. Nothing loads on the storefront except the optional floating WhatsApp button.

== External Services ==

This plugin connects to the Notify CRM server to provide store registration, plan verification, and account management functionality.

**Service:** Notify CRM
**URL:** https://api.hustletoevolve.com
**Terms of Service:** https://api.hustletoevolve.com/terms
**Privacy Policy:** https://api.hustletoevolve.com/privacy

**Endpoints used and when data is sent:**

1. **Register / Status** (`/api/plugin/status`) — Checks or creates your registration when you save the Store tab settings. Sends: store key, store URL.
2. **Verify** (`/api/customer/verify`) — Verifies your registration status. Sends: store key, store URL.
3. **Find Store** (`/api/customer/find-store`) — Looks up an existing store registration by domain. Sends: store domain.
4. **Disconnect** (`/api/customer/disconnect`) — When you manually disconnect your store. Sends: store key.
5. **Disconnect WhatsApp** (`/api/plugin/disconnect-whatsapp`) — When you disconnect your WhatsApp session. Sends: store key.
6. **Delete / Delete Account** (`/api/plugin/delete`, `/api/customer/delete-account`) — When you delete your account. Sends: store key, store URL.

**Data sent on initial registration:**
- Store URL (your WordPress site URL)
- Store name, owner name, owner email address, owner WhatsApp number
- Plugin version, WordPress version, WooCommerce version, PHP version

**Purpose:** Store registration and plan verification for plugin functionality. The data collected is used solely for plugin operation and to notify you about updates or new features.

No payment data, order data, customer data, or any other WooCommerce information is ever transmitted to the Notify CRM server.

== Changelog ==

= 1.0.0 =
* Initial release
* Custom order statuses (New Order, Pending Confirmation, Shipped, Returned / RTO)
* WhatsApp message queue with manual sending via wa.me
* Bulk WhatsApp send from orders list
* Branded email templates for all order statuses
* Courier management with tracking URL templates
* Floating WhatsApp button for storefront
* Phone number normalization with country code support
* Admin bar notification badge
* Message log with full history
* Order edit screen WhatsApp actions

== Upgrade Notice ==

= 1.0.0 =
Initial release. Install and configure via Notify CRM menu.

== Privacy Policy ==

Notify CRM collects store registration data (store name, URL, owner name, email, WhatsApp number, and software version information) and sends it to the Notify CRM server (api.hustletoevolve.com) when you complete registration in the Store tab. This data is used for plugin functionality and to inform you about plugin updates and new features.

No WooCommerce order data, customer data, or payment information is ever sent to any external server.

To delete your data from the server, go to Notify CRM > Account tab and click "Delete Account" in the Danger Zone.

== Screenshots ==

1. Dashboard — Store settings and registration status.
2. Message templates and notification settings.
3. Courier management with tracking URL templates.
4. Customer-facing WhatsApp message example.
