=== Tawked ===
Contributors: tawked
Tags: sms, otp, whatsapp, phone login, saudi arabia
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
WC requires at least: 9.0
WC tested up to: 11.1
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Phone sign-in and checkout codes by SMS, and WhatsApp order updates from your own number, for WooCommerce stores in Saudi Arabia.

== Description ==

Tawked connects your WooCommerce store to your Tawked application.

**Codes by SMS (Tawked Verify)**

* "Sign in with your phone" beside the password form on My Account and on wp-login.php. Customers can also create an account with a verified number.
* Optional phone verification at checkout: for every order, or only for the payment methods you choose (cash on delivery by default). The classic checkout and the Checkout block are both checked on the server.
* Codes reach Saudi mobile numbers only. They come by SMS from Tawked's sender ID and name your reviewed application, never your store's own sender name.
* Tawked makes and checks every code. WordPress never sees it.

**WhatsApp order updates (Tawked WhatsApp)**

* Map order statuses to your approved WhatsApp utility templates, and each placeholder to an order value (order number, customer name, total, status, tracking link, order page, store name or a fixed text).
* Messages go from the WhatsApp number connected to your Tawked application, in the background, with retries that never send twice.
* Optional opt-in box at checkout, so updates go only to customers who agreed.

**What you need**

A Tawked account with an application that has Verify and Notifications. Paste the application's live key (and, during review, its test key) in WooCommerce → Settings → Tawked.

== External services ==

This plugin connects to the Tawked API (https://tawked.com), run by Tawked, to send verification codes by SMS and WhatsApp messages. It sends nothing until you paste a key, and it calls the API only in these cases:

* When a visitor asks for a sign-in, sign-up or checkout code, and when they enter it: the visitor's mobile number, the visitor's IP address (used by Tawked for abuse limits), the code they typed, and the language of the SMS.
* When an order reaches a status you mapped to a WhatsApp template: the customer's mobile number, the template's name and language, and the values you mapped, such as the order number, the customer's name, the order total and status, the tracking link, the order page link and the store name.
* When you use the settings page: "Test connection", the template list and "Send a test".

Each call carries your application's key. Tawked's terms of service: https://tawked.com/en/terms. Tawked's privacy policy: https://tawked.com/en/privacy.

The plugin has no tracking or telemetry and loads no script or style from another site.

== Installation ==

1. Install and activate WooCommerce.
2. Upload the plugin and activate it.
3. Open WooCommerce → Settings → Tawked, paste your keys and press "Test connection".
4. Turn on phone sign-in, checkout verification or WhatsApp notifications in their sections.

Keys can also be set in wp-config.php with `TAWKED_LIVE_KEY` and `TAWKED_TEST_KEY`; the fields are then locked.

== Frequently Asked Questions ==

= Which numbers can receive codes? =

Saudi mobile numbers (05XXXXXXXX, 9665XXXXXXXX or +9665XXXXXXXX). A checkout with another number is refused or let through unverified, as you choose.

= Can staff sign in with a phone? =

No. Accounts that can edit content or manage the store always sign in with their password.

= What does the test key do? =

During your application's review the test key sends codes only to the Tawked account owner's verified phone, stamped as a test, 10 sends in all. Customers cannot receive codes while it is on, so the plugin warns you on every admin page. It never sends WhatsApp.

= Does it work with HPOS and the Checkout block? =

Yes. Both are declared compatible.

== Changelog ==

= 1.0.0 =
* First version: phone sign-in and sign-up, checkout verification, WhatsApp order updates.
