=== CatCode SMS Notifications with Termii for WooCommerce ===
Contributors: catcodestudio
Tags: sms, termii, order notifications, nigeria, woocommerce
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

Sends WooCommerce order updates to customers and new-order alerts to you by SMS through your own Termii account.

== Description ==

You sell with WooCommerce in Nigeria and use Termii for SMS, or want to. This plugin connects the two: when an order changes status, the customer gets a text, and you get one when an order comes in.

Termii is a third-party product. This is an independent integration, not affiliated with or endorsed by Termii.

= What it does =

* **A message for each order status**, custom statuses included. Processing and Completed are on from the start, the rest are one tick away.
* **Your own wording** with the customer's name, order number, total, payment link and more.
* **New-order alerts** to one or several of your own numbers.
* **Numbers fixed for you.** 0803 123 4567, +234 803 123 4567 and 00234 803 123 4567 all reach the same phone. Orders from other countries use that country's code.
* **The length before you save.** Each message box shows its length and warns about characters outside the basic SMS alphabet.
* **Test mode.** Nothing is sent to Termii, so you can try the whole flow first.
* **The wallet balance** on your settings page, and a record of each SMS on the order and in the Activity tab.
* **Generic or DND route**, your choice. DND must be activated on your account by Termii.

= Built not to waste balance or annoy customers =

* An order sends each message once, even if a status is changed back and forth.
* Sending happens in the background, so a slow network never slows the checkout.
* If Termii does not answer, the message is tried again later. If the balance runs out or the key stops working, messages wait up to 48 hours, then are dropped rather than arriving days late.
* A staging copy stays quiet. If the site's address changes, sending stops until you confirm that this is the real store, otherwise a test order would text a real customer.

// @pro-begin
= Pro =

Sold on [catcode.com.ua](https://catcode.com.ua/modules/termii-sms-woocommerce/) with a 7-day trial:

* **Send an SMS by hand** from the order screen.
* **Quiet hours.** Messages that come up at night go in the morning.
* **A different message per payment method**, for example your account details for bank transfer.
* **Tracking number and link** in any message, from the fields your courier plugin fills in.
* **SMS offers.** A consent box at checkout, classic and block, and offers only to customers who ticked it.
* **E-mail alerts** for refused credentials, empty balance and a low balance.

// @pro-end
= What it does not do =

* It does not sell SMS. You buy them from Termii and pay Termii's rates.
* It does not register a Sender ID. You register it with Termii and enter it in the plugin.

== Installation ==

1. Install and activate the plugin. WooCommerce must be active.
2. In your Termii dashboard copy your API key and your base URL. The base URL is different for every account.
3. Open **WooCommerce > Termii SMS** and enter the base URL, the API key and your Sender ID. The key is kept encrypted with your site's keys.
4. Turn on **Test mode** and place a test order. The Activity tab shows the outcome.
5. Turn test mode off when you are happy.

== Frequently Asked Questions ==

= Does this need a CatCode account? =

No. The plugin talks to Termii directly, with your own API key.

= What does a message cost? =

That is between you and Termii, see your Termii price list.

= Will old orders be texted when I connect? =

No. Only status changes after connecting send a message.

= A customer says they got nothing. What now? =

Open the order: the SMS box gives the state and the reason. Common reasons are a number that is not a mobile number, or a Sender ID that is not yet approved for your account.

== External services ==

This plugin connects to the Termii REST API, a service of Termii, which is what it exists for. The address is the base URL of your own account, which you enter in the settings. It sends nothing until you connect an account.

* What is sent: your API key with each call. For each message: the customer's or your phone number, the message text (which can include the customer's name, order number, total and links) and your Sender ID.
* When: when you connect or read the balance, when you send a test, and when an order reaches a status with a message turned on.

// @pro-begin
The Pro build also connects to catcode.com.ua to check the license key and offer updates, sending the key and the site address when you activate and periodically after that. [Terms](https://catcode.com.ua/terms/), [privacy policy](https://catcode.com.ua/privacy/).

// @pro-end
Termii [terms of use](https://termii.com/terms) and [privacy policy](https://termii.com/privacy-policy).

== Screenshots ==

1. Connecting the Termii account.
2. Messages for each order status.
3. Activity with each message and its outcome.

== Changelog ==

= 1.0.0 =
* First release.
