=== Corbit SMS for WooCommerce ===
Contributors: corbittechnology
Tags: sms, woocommerce, notifications, orders
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.4
License: GPLv2 or later

Send Corbit SMS notifications for WooCommerce order events.

== Description ==

This plugin connects WooCommerce to the Corbit SMS API. It supports notifications for order creation, payment, completion, cancellation, and refunds. Each event can be enabled independently and has an editable Arabic/English message template.

Features:
* Corbit API token and sender-name settings.
* Test SMS tool.
* Per-event templates and switches.
* Duplicate-send protection using WooCommerce order metadata.
* Masked local logs (last 100 attempts).
* HPOS-compatible order access.

== Installation ==

1. Install and activate WooCommerce.
2. Upload this ZIP from Plugins > Add New > Upload Plugin.
3. Activate the plugin.
4. Open WooCommerce > Corbit SMS.
5. Save the API token, approved sender name, and templates.
6. Send one test SMS before enabling live order notifications.

== Security ==

The API token is never shown after it is saved and is never written to plugin logs. WordPress options are not encrypted by default; access to the WordPress database and administrator accounts must be protected.

== External services ==

This plugin connects to the Corbit SMS API at https://app.mobile.net.sa to deliver SMS notifications. This external service is required for all SMS functionality.

When an administrator sends a test SMS, or when an enabled WooCommerce order event occurs, the plugin sends the following data to the Corbit SMS API:

* The recipient's mobile number.
* The configured sender name.
* The SMS message text. For order notifications, this may contain values selected by the site administrator, such as the customer name, order number, order total, order status, and site name.
* The Corbit API authentication token.

The service is operated by Corbit Company. A Corbit SMS account, an approved sender name, and sufficient SMS balance may be required.

Terms of service: https://app.mobile.net.sa/terms-of-use
Privacy policy: https://app.mobile.net.sa/privacy-policy.pdf

== Changelog ==

= 0.1.4 =
* Declared WooCommerce as a required plugin dependency.
* Removed the global WooCommerce dependency notice from unrelated admin screens.

= 0.1.3 =
* Added the GPL license to the plugin header.
* Added nonce verification for administrator result notices.
* Updated the package slug for WordPress.org directory compliance.

= 0.1.2 =
* Ensured that overlapping WooCommerce checkout hooks make only one SMS API attempt per order event.

= 0.1.1 =
* Added fallback triggers for classic and block checkout order creation.
* Prevented duplicate Order created messages across fallback hooks.

= 0.1.0 =
* Initial test release.
