=== Online SMS Notifications ===
Contributors: onlinesms
Tags: woocommerce, sms, notifications, transactional
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
WC requires at least: 6.0
WC tested up to: 10.4.3
Stable tag: 0.1.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send transactional SMS notifications for WooCommerce order status changes using OnlineSMS.

== Description ==
Online SMS Notifications integrates WooCommerce with OnlineSMS so you can send SMS messages automatically when an order status changes.

This plugin requires an [OnlineSMS](https://onlinesms.ro/) account. After registration and account validation, you receive **100 free SMS credits** for testing. Additional SMS credits can be purchased from [onlinesms.ro](https://onlinesms.ro/).

SMS messages are sent directly from your Android phone using your own number — no third-party SMS gateway needed.

Key features:
- Select one or more devices from your OnlineSMS dashboard.
- Configure SMS templates per order status.
- Round-robin device selection when multiple devices are selected.
- Log SMS attempts for the last 30 days.

== External services ==

This plugin connects to the [OnlineSMS](https://onlinesms.ro/) API to send transactional SMS messages from your Android phone when WooCommerce order statuses change.

**What data is sent and when:**
When a WooCommerce order status changes to an enabled status, the plugin sends the following data to the OnlineSMS API at `https://app.onlinesms.ro/api/`:
- Recipient phone number (billing phone from the order).
- SMS message content (generated from your configured template, which may include order number, status, totals, and customer name).
- Selected device ID (the Android device that will physically send the SMS).

Data is sent **only** when an enabled order status event triggers an SMS. No data is sent in any other circumstance.

**Service links:**
- [OnlineSMS Terms of Service](https://onlinesms.ro/terms/)
- [OnlineSMS Privacy Policy](https://onlinesms.ro/gdpr/)

This service is provided by OnlineSMS (https://onlinesms.ro/).

== Installation ==
1. Create an account at [onlinesms.ro](https://onlinesms.ro/) and validate it to receive 100 free SMS credits.
2. Install the OnlineSMS Android app on your phone and log in by scanning the QR code from the dashboard.
3. Install and activate this plugin from the WordPress Plugins page.
4. Go to WooCommerce > Online SMS Notifications.
5. Open API Documentation in your OnlineSMS dashboard and copy your API token.
6. Paste the token and click "Refresh devices".
7. Select one or more devices and enable/configure templates for each order status.

== Frequently Asked Questions ==
= Where do I get the API token? =
Log in to your OnlineSMS dashboard and open the API documentation page to copy your personal token.

= Which API URL is used? =
The plugin uses https://app.onlinesms.ro/api/ automatically.

= What variables can I use in templates? =
{order_id}, {order_number}, {status}, {total}, {currency}, {billing_first_name}, {billing_last_name}, {billing_phone}, {billing_email}, {billing_address_1}, {billing_address_2}, {billing_city}, {billing_postcode}, {billing_country}, {shipping_first_name}, {shipping_last_name}, {shipping_address_1}, {shipping_address_2}, {shipping_city}, {shipping_postcode}, {shipping_country}, {payment_method}, {shipping_method}, {site_name}, {order_date}

= Is this plugin free? =
The plugin is free. SMS sending uses credits from your OnlineSMS account. You get 100 free credits after registration and validation. Additional credits can be purchased at [onlinesms.ro](https://onlinesms.ro/).

= Does it log SMS attempts? =
Yes, the plugin stores logs locally for 30 days.

== Screenshots ==
1. Online SMS Notifications settings page.
2. Device selection and template configuration.
3. Logs view.

== Changelog ==
= 0.1.6 =
- Display available SMS credits on the settings page.
- Improved description with account setup instructions and free credits info.

= 0.1.5 =
- Enqueue CSS and JS via wp_add_inline_style/wp_add_inline_script instead of inline tags.
- Added Terms of Service and Privacy Policy links for external service documentation.
- Removed load_plugin_textdomain (not needed for WordPress.org hosted plugins).
- Updated Contributors field.

= 0.1.4 =
- WordPress.org compatibility updates for SQL identifier handling.
- Added privacy policy helper text for external API data transfer.
- Internal cleanup for release readiness.

= 0.1.3 =
- Input sanitization hardening (filter_input).

= 0.1.2 =
- Input sanitization hardening.

= 0.1.1 =
- Security hardening and compatibility updates.

= 0.1.0 =
- Initial release.

== Upgrade Notice ==
= 0.1.6 =
- Shows available SMS credits on the settings page.

= 0.1.5 =
- WordPress.org review compliance: enqueued assets, external service documentation, removed load_plugin_textdomain.

= 0.1.4 =
- WordPress.org compatibility updates and privacy disclosure improvements.

= 0.1.3 =
- Input sanitization hardening (filter_input).

= 0.1.2 =
- Input sanitization hardening.

= 0.1.1 =
- Security hardening and compatibility updates.

= 0.1.0 =
- Initial release.
