> For the complete documentation index, see [llms.txt](https://docs.smaq.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.smaq.io/documentation/connections/woocommerce.md).

# WooCommerce

### What SMAQ pulls

* Orders with line items, totals, statuses
* Products and variants
* Customers (email-hashed for privacy)
* Refunds
* Coupons used

### What you'll need

* A WooCommerce store running on WordPress.
* A **REST API consumer key** + **consumer secret** with at least Read permission. Generate in WordPress admin → WooCommerce → Settings → Advanced → REST API.
* Your store's base URL (e.g. `https://shop.example.com`).

### Steps to connect

1. **Data Source → Add data source**.
2. Pick **WooCommerce**.
3. Paste:
   * **Store URL**
   * **Consumer key**
   * **Consumer secret**
4. Name and click **Connect**.

> **\[Screenshot needed]** WooCommerce connection form with store URL, key, and secret fields visible.

### Tips

* **Use Read permission only.** SMAQ never writes back to WooCommerce — Read is sufficient and safest.
* **HTTPS required.** WooCommerce's REST API rejects non-HTTPS requests. If your store is on HTTP, set up SSL first.
* **Pagination.** Stores with 10,000+ orders may take a few minutes to do the initial sync. Subsequent syncs are incremental.

### Troubleshooting

* **"401 Unauthorized"** — regenerate the consumer key/secret. WooCommerce sometimes invalidates older keys after plugin updates.
* **"Missing fields"** — some product/order fields depend on installed WooCommerce extensions. SMAQ pulls the standard schema; custom fields require [Custom endpoint](/documentation/connections/custom-endpoint.md).
