> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tawked.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WooCommerce

> The Tawked plugin for WooCommerce stores: phone sign-in and checkout codes by SMS with Tawked Verify, and WhatsApp order updates from the store's own number with Tawked Notifications.

The Tawked plugin for WooCommerce stores in Saudi Arabia: customers sign in with a code sent to their phone, confirm their number with a code before cash on delivery, and get order updates on WhatsApp from the store's own number. The codes are Tawked Verify; the order updates are Tawked Notifications. Its page on Tawked: [tawked.com/en/woocommerce](https://tawked.com/en/woocommerce).

The **Tawked** plugin connects your WooCommerce store to your Tawked application. Customers sign in and verify their phone at checkout with a code by SMS, and get order updates on WhatsApp from your own number. You install a plugin and paste two keys; you write no code.

| It does | It does not |
| - | - |
| Adds "Sign in with your phone" beside the password form on My Account and `wp-login.php`, and sign-up with a verified number | Replace passwords: the password form stays, and staff accounts always sign in with their password |
| Verifies the customer's phone at checkout, for every order or only for the payment methods you choose (cash on delivery by default) | Send codes to numbers outside Saudi Arabia |
| Sends a WhatsApp update when an order reaches a status you mapped to an approved utility template | Send marketing messages, abandoned-cart reminders or codes on WhatsApp |
| Works with the classic checkout and the Checkout block, and with HPOS | Track visitors or load anything from another site |

Tawked makes and checks every code: WordPress never sees it. Codes come by SMS from Tawked's sender ID and name your reviewed application, never your store's own sender name.

## Requirements

* The plugin's current version: 1.0.0.
* WordPress 6.6 or newer, PHP 7.4 or newer, WooCommerce 9.0 or newer.
* A Tawked application with Tawked Verify for codes, Tawked Notifications for WhatsApp updates, or both.
* For WhatsApp updates: a WhatsApp number connected to the application, and at least one approved utility template.

## Set it up

The fastest start is the WooCommerce sign-up: [tawked.com/en/signup?via=woocommerce](https://tawked.com/en/signup?via=woocommerce) picks both products for you and, once the application is created, opens its WooCommerce page with these steps.

<Steps>
  <Step title="Download and install the plugin">
    Download the plugin's ZIP from [tawked.com/downloads/tawked-woocommerce.zip](https://tawked.com/downloads/tawked-woocommerce.zip), or from the application's **Integrations → WooCommerce** page in the console. In WordPress, open **Plugins › Add New Plugin › Upload Plugin**, choose the file, then install and activate it.
  </Step>

  <Step title="Create the plugin's keys">
    On the application's **Integrations → WooCommerce** page, choose **Create the key** for the **Live key** and, while the application is in review, for the **Test key**. Each key shows once: copy it then. The keys are marked as the plugin's and carry only what the plugin calls (`verify:send` for codes, `notifications:send` for WhatsApp updates). They are created by the owner, or an admin or developer whose access covers the whole application.
  </Step>

  <Step title="Get WhatsApp ready">
    If the application has Notifications, connect the number on **Notifications → Overview** and get a utility template approved on **Notifications → Templates**. The page shows both as done when they are.
  </Step>

  <Step title="Paste the keys and test the connection">
    In WordPress, open **WooCommerce › Settings**, the **Tawked** tab, its **Connection** section. Paste the live key in **Live key** and the test key in **Test key**, save, then press **Test connection**. The console's WooCommerce page shows the plugin's last call and updates by itself.
  </Step>

  <Step title="Turn on what you want">
    Turn on **Phone sign-in**, **Checkout** verification or **WhatsApp notifications** in their sections.
  </Step>
</Steps>

Keys can also be set in `wp-config.php`. The fields are then locked:

```php title="wp-config.php" theme={"dark"}
define( 'TAWKED_LIVE_KEY', 'tk_live_xxxxxxxxxxxxxxxxxxxx' );
define( 'TAWKED_TEST_KEY', 'tk_test_xxxxxxxxxxxxxxxxxxxx' );
```

## Configure

All settings are under **WooCommerce › Settings › Tawked**.

| Section | Setting | What it does |
| - | - | - |
| Connection | **Live key**, **Test key** | The application's keys. A saved key is never shown again: leave the field empty to keep it. |
| Connection | **Use the test key for codes** | Codes go through the test key while the application is in review. Off by default. |
| Phone sign-in | **Offer "Sign in with your phone"**, **Where** | My Account, `wp-login.php`, or both. |
| Phone sign-in | **Sign-up by phone** | A verified number with no account can create one; the name and an email are asked. Needs WooCommerce's own registration on. |
| Phone sign-in | **Language of the SMS** | The store's language (the default), Arabic or English. |
| Checkout | **Verify the phone** | Off, for every order, or only for the payment methods you choose. |
| Checkout | **A number outside Saudi Arabia** | Refuse the order, or let it through unverified. |
| WhatsApp notifications | **Send order updates on WhatsApp** | Turns the section on. |
| WhatsApp notifications | **Who receives them** | Customers who tick the box at checkout (the default), or every customer with a Saudi mobile. |
| WhatsApp notifications | A row per order status | The approved utility template for that status, and the value of each placeholder. |
| Abuse limits | **Codes per minute, whole store**, **Codes per hour, whole store** | A store-wide budget on top of the limits per phone and per visitor. 20 a minute and 200 an hour by default. |
| Abuse limits | **Behind a proxy or CDN**, **Trusted proxy ranges** | Reads the visitor's address from your proxy's header, only from the ranges you list. |

### Placeholder values

Each placeholder of a mapped template takes one of these values:

| Value | What goes in |
| - | - |
| Order number | The order's number |
| Customer's first name, Customer's full name | From the billing details |
| Order total | The total, as the store shows it |
| Order status | The status name, in the template's language |
| Tracking link | An order meta key you name (`_tawked_tracking_url` by default). WooCommerce Shipment Tracking is read too. |
| Order page link | The customer's order page. For a link button, the part after the template's fixed address. |
| Order ID | WooCommerce's id of the order |
| Store name | The site's name |
| Fixed text | A text you type |

Templates that open with an image, a video or a document cannot be sent by this version: **Send a test** on the row says so.

## Review and test mode

Every application is reviewed before its codes reach the public:

* **In review**: the live key sends WhatsApp updates now, and refuses codes. The test key sends codes only to the Tawked account owner's verified phone, stamped as a test, 10 sends per application. Customers cannot receive codes while it is on, so the plugin shows a notice on every admin page and a banner on the store for managers.
* **Approved**: the live key sends codes to every Saudi mobile. **Test connection** with the live key turns the test-key switch off by itself.

Codes are charged at the [Verify price](https://tawked.com/en/pricing) from the account's prepaid balance. WhatsApp updates are charged like any message, and Meta bills your WhatsApp Business Account directly for its fees.

## What the plugin sends to Tawked

| When | What |
| - | - |
| A visitor asks for a sign-in, sign-up or checkout code, and enters it | The mobile number, the visitor's IP address (for Tawked's abuse limits), the code typed, the SMS language |
| An order reaches a mapped status | The customer's mobile, the template's name and language, the values you mapped |
| You use the settings page | **Test connection**, the template list and **Send a test** |

Each call carries your application's key and a `User-Agent` of `Tawked-WooCommerce/<version>`. WhatsApp updates go in the background through WooCommerce's Action Scheduler, with retries that never send twice. Each outcome is a private note on the order.

## Test connection

**Test connection** checks each key without sending anything, and answers one line per key:

| Line | Meaning |
| - | - |
| Live key, codes: Ready: codes can go to customers. | The application is approved and the live key sends codes. |
| Test key, codes: Ready: codes go only to the account owner's verified phone, stamped as a test. | The test key works. |
| Live key, WhatsApp: Connected: 3 approved utility templates. | The number is ready, with that many templates to map. |
| Codes are not available for this application yet: it is in review, or it was rejected or suspended. | Codes wait for approval. The test key works meanwhile, and so does WhatsApp with the live key. |
| This key is not allowed to do this. | The key lacks Verify or Notifications access. Create the plugin's keys again on the WooCommerce page. |
| Tawked does not know this key. It may be revoked or mistyped. | The key is revoked, mistyped, or pasted in the other field. |
| No WhatsApp number is connected to this application. | Connect one on **Notifications → Overview**. |

A partner key (`tk_partner_`) is refused: it is not for a store.

## Limits

* **Saudi mobile numbers only**: `05XXXXXXXX`, `9665XXXXXXXX` or `+9665XXXXXXXX`.
* **Per phone**: one code a minute and three every 15 minutes. **Per visitor's address**: 20 an hour. Wrong codes lock the phone for an hour after 10.
* **Tawked's own limits** apply on top: 5 codes per number per hour by default, three wrong attempts per code, and the [protection guard](/reliability#the-protection-guard).
* **Staff never sign in by phone.** An account that can edit content or manage the store, or has two-factor sign-in on, keeps its password sign-in.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Customers do not get codes">
    Check the top of any admin page: "Tawked: codes are using the test key" means only the account owner's phone receives codes. Turn **Use the test key for codes** off once the application is approved. Then check the balance in the Tawked console.
  </Accordion>

  <Accordion title="&#x22;WhatsApp update not sent&#x22; on an order">
    The order note names the reason. "The customer asked not to receive WhatsApp messages" means they stopped your messages. A low balance or a disconnected number also shows a notice on the Tawked tab and the orders screen.
  </Accordion>

  <Accordion title="A template is missing from the list">
    Only approved utility templates are offered. Marketing templates need consent the plugin does not collect, and authentication templates are for codes. Press **Refresh templates** after Meta approves one.
  </Accordion>

  <Accordion title="The tracking link stayed empty">
    The update waits for the link and tries again every hour for a day. Fill the order meta key the row names, or use WooCommerce Shipment Tracking.
  </Accordion>
</AccordionGroup>

## Disconnecting and your data

**Disconnect WooCommerce** on the application's WooCommerce page revokes the plugin's keys: codes and order updates in your store stop until you create new ones. What was sent stays in the logs. Deleting the plugin in WordPress removes its settings, counters and scheduled jobs. Customers' verified phones stay on their accounts unless **On uninstall** is ticked (**Delete customers' verified phones when the plugin is deleted**, off by default). The plugin has no tracking or telemetry. See Tawked's [terms](https://tawked.com/en/terms) and [privacy policy](https://tawked.com/en/privacy).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.