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

# WooCommerce

WooCommerce is a WordPress-based ecommerce plugin used by millions of online stores. Merchants connect to Violet using REST API keys generated from their WordPress admin.

## Connection

Merchants provide a **Consumer Key**, **Consumer Secret**, and their **Store URL**. These are generated in the WooCommerce admin under **WooCommerce → Settings → Advanced → REST API**.

### Permalink Requirement

WooCommerce's REST API requires the **Post name** permalink structure to function correctly. Merchants using the default WordPress permalink structure (`/?p=123`) will encounter 404 errors. Merchants should confirm this setting under **Settings → Permalinks** in WordPress.

## Webhooks

Webhooks are registered and managed automatically by Violet. The following topics are used:

| Topic             | Purpose                             |
| ----------------- | ----------------------------------- |
| `product.created` | New product published               |
| `product.updated` | Product changes synced              |
| `product.deleted` | Product removed from catalog        |
| `order.updated`   | Order status or fulfillment updated |
| `order.deleted`   | Order removed                       |

Webhooks are named using the pattern `violet_{topic}_{environment}` to distinguish Violet's webhooks from others and to avoid accidental deletion.

## Notable Behavior

* **Product types**: WooCommerce has `simple`, `variable`, `grouped`, `external`, `virtual`, and `downloadable` product types. Violet syncs `simple` and `variable` products. Variable products use WooCommerce's variation system, which Violet maps to its unified variant model.
* **Discount codes**: WooCommerce coupon codes are supported. Violet distributes discount amounts at the line-item level and creates a coupon line in the submitted order.
* **Tax**: WooCommerce's tax configuration can be complex. Tax calculation behavior depends on the merchant's store settings.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.violet.io/ecom-platforms/woocommerce.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
