wordpress-sms-center-plugin/README.md
2026-12-01 15:26:33 +02:00

48 lines
3.3 KiB
Markdown

# Interweb Mozambique WordPress SMS Center plugin
<!-- badges:start -->
[![Release](https://git.interweb.co.mz/interweb-mz/wordpress-sms-center-plugin/badges/release.svg)](https://git.interweb.co.mz/interweb-mz/wordpress-sms-center-plugin/releases) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
<!-- badges:end -->
[Português](README-pt.md)
<!-- kb:start -->
Step-by-step guide in our [Knowledgebase](https://www.meu.interweb.co.mz/knowledgebase/3336?language=english).
<!-- kb:end -->
> API: `https://api.interweb.co.mz`, built in. Create your key in the [API Center](https://www.meu.interweb.co.mz/api-center.php) of Meu Interweb. Documentation: https://docs.interweb.co.mz
WordPress and WooCommerce plugin for SMS. It uses only our public API, with your account key. Works in Portuguese and English.
## What it does
- Order alerts: an SMS when the order is received, paid, shipped, completed, cancelled or refunded, and a new order alert to your mobile. Each alert turns on separately, with texts in pt and en.
- Send SMS: one message to many people from the dashboard (numbers you write, WooCommerce customers, or both). A review step shows the count and the cost before anything goes out.
- Order page: a box to send an SMS to the customer of that order. The message is noted in the order.
- Test and log: test send, connection test with the SMS balance, and the last 50 events.
## Install
1. Copy the `interweb-mz-sms-center` folder to `wp-content/plugins/` (or build a zip with `tools/build-zip.sh` and upload it in Plugins > Add New).
2. Activate the plugin and open Settings > Interweb Mozambique SMS Center.
3. Paste the API key and click "Test the connection".
## Languages
- The code is in English. Translations are gettext files in `interweb-mz-sms-center/languages` (`.pot`, and `.po` with `.mo` for `pt_PT`, `pt_BR` and `pt_AO`).
- "Same as WordPress" follows the WordPress language; "Português" or "English" fixes the plugin language. Order alerts go in each customer's language.
- After changing texts: `python3 -I tools/i18n-check.py --pot`, translate in the `.po` files, `python3 -I tools/build-mo.py` and `python3 -I tools/i18n-check.py`.
## The key
- Create it in the [API Center](https://www.meu.interweb.co.mz/api-center.php) of Meu Interweb, with `sms:read` and `sms:write`. A `sandbox_` key simulates every send and spends nothing.
- It is stored encrypted (AES-256-GCM, with the WordPress security keys) and never shown again. You can define `INTERWEB_MZ_SMS_CENTER_API_KEY` in `wp-config.php` instead.
## Good to know
- Each alert goes out in the background (Action Scheduler) and only once per order and event, so a retry never sends twice.
- Mass sends go in batches of 500, up to 5,000 numbers at a time, with an `Idempotency-Key` per batch.
- The "Shipped" status comes from the plugin. If a shipping plugin already adds one, choose it in "Status that means shipped" and turn ours off.
- It can run next to the Interweb Mozambique Connect plugin. If both send order SMS, turn the alerts on in only one of them.
- Optional constants in `wp-config.php`: `INTERWEB_MZ_SMS_CENTER_API_KEY`, `INTERWEB_MZ_SMS_CENTER_ENCRYPTION_KEY`.
Requirements: WordPress 6.0 or newer, PHP 7.4 to 8.5, OpenSSL extension. WooCommerce 7.0 or newer for the order alerts.
---
Maintained by RLX Holdings.