=== MSG91 for WooCommerce ===
Contributors: prashantpatidar
Tags: woocommerce, sms, msg91, notifications
Requires at least: 5.0
Tested up to: 6.8
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Easily send automated SMS notifications via MSG91 for WooCommerce events.

== Description ==
The **MSG91 for WooCommerce** plugin enables automated SMS notifications via MSG91 when specific WooCommerce events occur. 
It provides an admin interface for managing webhook automations and settings, including storing and retrieving the MSG91 AuthKey.

== Features ==
- Automated SMS Notifications for WooCommerce events.
- Admin Interface to manage automation triggers.
- AuthKey Management stored securely in the database.
- Scalable Architecture for easy extension.

== Installation ==
1. Download the plugin ZIP file.
2. Navigate to **Plugins > Add New** in your WordPress admin panel.
3. Click **Upload Plugin**, select the ZIP file, and click **Install Now**.
4. Activate the plugin.
5. Go to **WooCommerce > MSG91 Settings** to configure the plugin.

== Supported WooCommerce Events ==
This plugin triggers SMS notifications for:
- New Customer Registration (`woocommerce_new_customer`)
- Customer Update (`woocommerce_update_customer`)
- New Order Placement (`woocommerce_new_order`)
- Order Update (`woocommerce_update_order`)
- Payment Completion (`woocommerce_payment_complete`)
- Order Completion (`woocommerce_order_status_completed`)
- Order Cancellation (`woocommerce_order_status_cancelled`)
- Order Refund (`woocommerce_order_status_refunded`)

== How to Use ==
= Setting Up the MSG91 AuthKey =
1. Navigate to **WooCommerce > MSG91 Settings**.
2. Enter your **AuthKey**.
3. Click **Save** to store it securely in the database.

= Managing Automation Rules =
1. Navigate to **WooCommerce > MSG91 Automation**.
2. Add or update automation rules for triggering Campaign notifications via multiple channels.

== File Storage and Data Management ==
This plugin follows WordPress.org guidelines for file storage:

= Data Storage Location =
- Plugin Data: All plugin-generated files are stored in the WordPress uploads directory at `wp-content/uploads/msg91-for-woocommerce/`
- WordPress Compliance: Ensures compatibility with plugin update guidelines
- Automatic Cleanup: Files are removed when the plugin is uninstalled

= File Operations =
The plugin uses the WordPress filesystem API for secure operations:
- Save JSON files in uploads directory
- Read stored JSON files
- Delete files when needed
- Automatic migration of old files to uploads during activation

== External Services ==
This plugin connects to external services:

= MSG91.com =
- Purpose: SMS delivery service for sending automated notifications
- Data sent: User phone numbers, message content, campaign data
- API Endpoint: https://control.msg91.com/api/v5
- Terms of use: https://msg91.com/terms
- Privacy policy: https://msg91.com/privacy

= Additional Services =
- IP Info API: Used for location-based services (https://ipinfo.io/json)
- Sokt.io: Used for flow management (https://flow.sokt.io)

== Support ==
For any issues, contact support via [GitHub Issues](https://github.com/your-repo/issues) 
or the WooCommerce Support Forums.

== Frequently Asked Questions ==
= What is MSG91? =
MSG91 is a cloud communication platform that provides SMS services for businesses.

= Do I need a MSG91 account? =
Yes, you need to sign up for a MSG91 account to get your AuthKey.

= Is this plugin free? =
Yes, this plugin is free and open source under the GPLv2 license.

= Does this plugin work with WooCommerce? =
Yes, this plugin is specifically designed for WooCommerce and requires WooCommerce to be installed and activated.

== Screenshots ==
1. Plugin settings page
2. Automation management interface
3. Dashboard overview

== Changelog ==
= 1.0.0 =
* Initial release
* Basic SMS automation functionality
* Admin interface for managing automations
* Secure AuthKey storage

== Upgrade Notice ==
= 1.0.0 =
Initial release of the plugin.
