=== Sendmachine SMS ===
Contributors: sendmachine
Tags: sendmachine,sms,order notifications,sms marketing
Requires at least: 5.8
Tested up to: 6.9
Stable tag: 1.0.0
Requires PHP: 7.0
Requires Plugins: sendmachine
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send SMS messages directly from WordPress using Sendmachine. Includes support for WooCommerce order status notifications.

== Description ==

This plugin requires the [Sendmachine for WordPress](https://wordpress.org/plugins/sendmachine/) core plugin. [WooCommerce](https://wordpress.org/plugins/woocommerce/) is optional and needed only for order SMS notifications.

Once activated, the plugin allows you to:

**Send SMS notifications on order status changes** *(requires WooCommerce)*
Automatically send an SMS to the customer whenever an order changes status — pending, processing, on-hold, completed, cancelled, refunded, or any custom WooCommerce status. Each status has its own template that you can enable or disable independently.

**Customise SMS templates** *(requires WooCommerce)*
Each template supports dynamic variables like `{order_number}`, `{billing_first_name}`, `{order_status}`, `{order_total}`, `{shop_name}` and more. Templates can be reset to their default text at any time.

**Test mode**
Redirect all outgoing SMS messages to a single test phone number without contacting real customers. Useful for verifying templates before going live.

**Send admin copy**
Optionally receive a copy of every customer SMS on a separate admin phone number.

**SMS delivery log** *(requires WooCommerce)*
Every SMS sent is logged - including order reference, recipient, message text, delivery status and timestamp. The log is searchable and paginated.

**Click tracking**
Optionally enable Sendmachine click tracking on links included in your messages.

**Custom sender**
Set a sender that appears as the sender name on the customer's phone. Requires a sender already configured in your Sendmachine account.

== Installation ==

1. Make sure **Sendmachine for WordPress** is installed and active.
2. In your WordPress admin panel, go to *Plugins > New Plugin*, search for **Sendmachine SMS** and click *Install now*
3. Alternatively, download the plugin and upload the contents of `sendmachine-sms.zip` to your plugins directory, which usually is `/wp-content/plugins/`
4. Activate the plugin through the 'Plugins' menu in WordPress
5. Go to *Sendmachine > Settings > Orders SMS* and configure your sender and phone numbers.
6. If you use WooCommerce, go to *Sendmachine > Settings > Orders SMS Templates* to enable and customise the message templates for each order status.

== Frequently Asked Questions ==

= Does this plugin work without Sendmachine for WordPress? =

No. This is an addon and requires the [Sendmachine for WordPress](https://wordpress.org/plugins/sendmachine/) core plugin to function.

= Does this plugin require WooCommerce? =

No. WooCommerce is optional. Without it, order SMS features (notifications, templates, history) will not be available, but the plugin will still activate and other SMS features will work normally.

= Do I need a Sendmachine account? =

Yes. You can [create one for free](https://www.sendmachine.com/admin/#/register). SMS credits are purchased separately through your Sendmachine account.

= Which order statuses are supported? =

All standard WooCommerce statuses are supported: pending, processing, on-hold, completed, cancelled and refunded. Custom statuses registered by other plugins are also detected automatically.

= Can I disable notifications for certain statuses? =

Yes. Each status has its own template with an individual enable/disable toggle in *Sendmachine > Settings > Orders SMS Templates*.

= Where can I see sent messages? =

Go to *Sendmachine > Orders SMS History* to see a log of all sent messages including delivery status.

= What variables can I use in templates? =

`{order_id}`, `{order_number}`, `{order_reference}`, `{order_status}`, `{order_total}`, `{order_date}`, `{billing_first_name}`, `{billing_last_name}`, `{shop_name}`, `{tracking_number}`.

== Screenshots ==

1. Orders SMS Settings — sender, test mode and admin copy
2. Orders SMS Templates — per-status templates with variables
3. Orders SMS History — delivery log with search and pagination

== External Services ==

This plugin connects to the **Sendmachine** API to provide its functionality. Specifically, it:

* Sends SMS messages to customers when a WooCommerce order changes status, using the recipient's phone number, sender name, and message text.
* Sends a test SMS to a specified phone number from the settings page.
* Retrieves your account's SMS credit balance for display in the WordPress admin.

This service is contacted whenever you send or test an SMS, or when the SMS credit balance is refreshed in the admin dashboard.

* Service: [https://www.sendmachine.com](https://www.sendmachine.com)
* Privacy Policy: [https://www.sendmachine.com/confidentialitate.html](https://www.sendmachine.com/confidentialitate.html)
* Terms of Service: [https://www.sendmachine.com/termeni-si-conditii.html](https://www.sendmachine.com/termeni-si-conditii.html)

== Changelog ==

= 1.0.0 =
* Initial release
