=== CatCode Spryng Notifications for WooCommerce ===
Contributors: catcodestudio
Tags: sms, spryng, woocommerce, order notifications, netherlands
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

SMS messages about WooCommerce orders through your Spryng account: the buyer is texted when the order status changes.

== Description ==

Sends an SMS to the billing phone number of the buyer when the status of an order changes, through your own [Spryng](https://www.spryng.nl/) account, and a text to your own phone when a new order comes in. You write the text; the plugin does the rest in the background.

* **Order statuses** — tick the statuses that should send a message: processing, completed, on hold, cancelled, refunded, failed and your own statuses.
* **Your text with placeholders** — shop name, order number, order total, billing first and last name, status name, the link to the order page and the link to pay.
* **New order alert** — an SMS to your own phone when an order comes in, with a text you can edit.
* **Key and balance check** — one click tells you whether Spryng accepts the REST API key and how many credits are left.
* **Journal** — the latest messages with the order, number, text and whether Spryng accepted them.
* **Phone numbers sorted out** — numbers are turned into the international form Spryng expects (31612345678) using the billing country, so "06 12345678", "0031 6 12345678" and "+31 6 12345678" all work.
* **Sent once** — each status sends one message per order, even when the status changes twice in a row or two requests overlap. A message that could not reach Spryng (or got HTTP 429 or 5xx) is retried once after five minutes; one that Spryng refused (bad number, bad sender, blocked country) is not repeated, and the reason is written to the order notes.
* **Everything is in the order notes** — what was sent, to which number, or why it was not.
* **Test message** — a test SMS to your own phone is one click away.
* HPOS and block checkout compatible. The API key is stored encrypted.
// @pro-begin
* Translations included: English, Dutch.
// @pro-end

// @pro-begin
= Pro =

The Pro version is sold on [catcode.com.ua](https://catcode.com.ua/modules/catcode-spryng-notifications-for-woocommerce/), with a 7-day trial that never starts by itself:

* **A text for every status and language** — each order status gets its own text, and multilingual shops (WPML, Polylang) add texts in their other languages.
* **Delivery reports** — paste one address in the Spryng portal; the journal and the order notes then show delivered or not delivered, with the reason.
* **WhatsApp templates** — send an approved WhatsApp template instead of an SMS for the statuses you choose, through the Meta WhatsApp API of Spryng, with an SMS as a fallback.
* **Payment reminder** — one SMS with the payment link for an order that is still unpaid after the time you set.
* **Consent checkbox** — "Send me SMS messages about my order" at checkout (classic and block); only those who tick it are texted.
* **Bulk SMS** — one message to everyone who ordered in the last N days, sent in the background.
* **Message from the order screen** — a free-text SMS to the buyer of that order.
* **Low balance warning** — an e-mail to the site admin when the credits fall below the limit you set.
* Updates from catcode.com.ua.

The licence runs for 1-5 years and includes updates and support for that term; a purchased licence keeps its Pro features after the term ends. One key covers two sites: the shop and its test copy.
// @pro-end

Spryng is a trademark of its owner. This plugin is an independent integration made by CatCode; it is not an official plugin of Spryng and is not affiliated with or endorsed by it. You need your own Spryng account with credits.

== External services ==

The plugin connects to the Spryng REST API (Spryng B.V., [spryng.nl](https://www.spryng.nl/), API documentation at [docs.spryngsms.com](https://docs.spryngsms.com/)) at `rest.spryngsms.com`, and only after you enter your API key.

* When a message is sent: the text of the message, the phone number of the recipient, your sender name, the route and the order number as a reference, together with your REST API key for authentication. The text and the number come from the order, so they can contain the buyer's name and the order link.
* When you press "Check the key and the balance": the API key, to read the number of credits.
// @pro-begin
* WhatsApp messages (Pro): the phone number of the recipient, the template name, its language code and the values of its variables; "Show my templates" reads the templates of your WhatsApp Business Account.
// @pro-end

[Spryng terms and conditions](https://enhancedsupport.spryng.co.uk/terms-of-service/) · [Spryng privacy policy](https://enhancedsupport.spryng.co.uk/privacy-policy/)

== Installation ==

1. Upload the plugin and activate it. WooCommerce must be active.
2. WooCommerce → **Spryng**. In the Spryng portal open Your Profile → Security, generate a REST API key and paste it into the plugin; enter your sender name.
3. Press "Check the key and the balance", tick the order statuses, edit the text and save.
4. Enter your own number, press "Send a test SMS", then place a test order.

== Frequently Asked Questions ==

= Do I need a Spryng account? =

Yes. The messages are sent and charged by Spryng through your account; the plugin does not sell SMS.

= Which phone numbers get a message? =

The billing phone of the order. With a missing or invalid number nothing is sent and an order note says so.

= What can the sender be? =

Up to 11 letters and digits (for example the name of your shop) or a phone number of up to 14 digits. Some countries only deliver messages from a registered sender; Spryng support can tell you what applies to yours.

= A message was not sent. Where do I see why? =

In the notes of the order and in WooCommerce → Spryng journal.

== Changelog ==

= 1.0.0 =
* First release.
