=== CatCode SMS Notifications with SMS Misr for WooCommerce ===
Contributors: catcodestudio
Tags: sms, smsmisr, order notifications, egypt, 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 SMS Misr account in Egypt, in English or Arabic.

== Description ==

You sell with WooCommerce in Egypt and use SMS Misr, 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.

SMS Misr is a third-party service. This is an independent integration, not affiliated with or endorsed by SMS Misr.

= 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**, in English or Arabic, 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.** 01012345678, +20 101 234 5678 and 0020 101 234 5678 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 the number of SMS parts, and notes that Arabic text fits fewer characters per part.
* **Test mode.** Uses the SMS Misr test environment, so you can try the whole flow first.
* **A record of each SMS** on the order and in the Activity tab.

= Built not to 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 SMS Misr does not answer, the message is tried again later. If the credentials stop 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/smsmisr-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.
* **E-mail alerts** for refused credentials and a low balance.

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

* It does not sell SMS. You buy them from SMS Misr and pay SMS Misr's rates.
* It does not register a Sender ID. You request it from SMS Misr; its approval gives you the Sender Token this plugin needs.
* It does not show delivery reports or customer replies: the SMS Misr developer page describes no webhook for them.

== Installation ==

1. Install and activate the plugin. WooCommerce must be active.
2. Open **WooCommerce > SMS Misr SMS** and enter your SMS Misr username, password and Sender Token. The password is kept encrypted with your site's keys.
3. Check the two language values on that page with SMS Misr. The plugin sends the first for Latin text and the second for Arabic text.
4. Keep **Test mode** on 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 SMS Misr directly, with your own account.

= 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. A common reason is a number that is not an Egyptian mobile number.

= Does it send Arabic? =

Yes. Write the message in Arabic in the box for the status.

== External services ==

This plugin connects to the SMS Misr API (smsmisr.com), a service of SMS Misr, which is what it exists for. It sends nothing until you connect an account.

* What is sent: your SMS Misr username and password and your Sender Token with each call. For each message: the customer's or your phone number and the message text (which can include the customer's name, order number, total and links).
* 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
SMS Misr: https://smsmisr.com/

== Screenshots ==

1. Connecting the SMS Misr account.
2. Messages for each order status with the length estimate.
3. Activity with each message and its outcome.

== Changelog ==

= 1.0.0 =
* First release.
