# WooCommerce

WooCommerce store on your WordPress: products, orders, customers, shipping, taxes and reports, also over MCP.

Source: https://ardumaker.com/en/docs/woocommerce/

- Category: Servers and infrastructure
- Status: Available
- Requirements: A [WordPress](https://ardumaker.com/en/docs/wordpress) site installed as an app; The WooCommerce plugin active (installed with `extras` or as a plugin)
- MCP tools (Read only): `ver_reportes_tienda_wordpress`, `listar_sitios_wordpress`
- MCP tools (Write or modify): `instalar_app`
- MCP tools (Destructive): `editar_tienda_wordpress`, `editar_integraciones_wordpress`, `controlar_extensiones_wordpress`

## What can you do with it?

WooCommerce is a variant of a WordPress site: ArduMaker installs it when creating the site and then lets you operate the whole store with wp-cli (`wp wc`, the WooCommerce CLI over its REST API), as the site admin.

- Products and variations, categories, tags, attributes and their terms, and inventory.
- Orders, order notes and refunds.
- Customers and coupons.
- Shipping zones with their methods and locations, taxes and tax classes.
- Payment gateways and `woocommerce_*` settings.
- Sales reports and best sellers.
- WooCommerce webhooks to other systems.

## When should you use it?

- Your own store on your server, without store-platform fees.
- Load or update catalog and stock from an AI agent.
- Check the month's sales without logging into the WordPress admin.

## How does it work in ArduMaker?

When the site is created with `config.extras` including `woocommerce`, the `configurar` step installs and activates the `woocommerce` plugin from wordpress.org; if Elementor was not requested the `storefront` theme is activated too, and the shop, cart, checkout and my-account pages are created. Repeating it duplicates nothing. A site brought from a backup gets no variants: it brings its own plugins.

Every store operation is `wp wc` with a resource and an action (`listar`, `ver`, `crear`, `editar`, `eliminar`). `data.id` identifies the object, `data.parent` the object it hangs from (product of a variation, order of a refund or note, zone of a method, attribute of a term) and `data.fields` the WooCommerce API fields.

## What actually changes?

Changes land in the site database (`wp<id>`), just as if they were made from the WooCommerce admin. Stock is a product field (`stock_quantity`, `manage_stock`); the `inventario` resource lists it for all products.

> **PELIGRO:** Refunding and deleting require `confirmed: true`: they move money or cannot be undone.

## Diagram

**A store operation**

```text
Agent or dashboard (`editar_tienda_wordpress`)
  ↓
ArduMaker backend (permissions and command building)
  ↓
VPS agent (`wp wc …` as the site user)
  ↓
WooCommerce (`wp<id>` database)
```

## Expected result

Each call returns what WooCommerce answered (the product, the order, the list). `ver_reportes_tienda_wordpress` returns, for the period (by default the current month, up to 1000 orders), orders, items, revenue, discounts, shipping and taxes of paid or in-progress orders, or the best-selling products by quantity.

## Errors and troubleshooting

- `wordpress_comando_fallido` (422): `wp wc` answered with an error; the message carries the trimmed output to fix the request.
- The inventory uses the old `wp wc` schema: `in_stock`, not `stock_status`.
- A setting must be named `woocommerce_<name>`.
- If the variant could not be installed when creating the site, the operation fails with `wordpress_variantes_no_instaladas` and can be retried.

## MCP access

The store is operated from the [/mcp/wordpress](https://ardumaker.com/en/mcp/wordpress) domain (general reference at [/mcp/docs](https://ardumaker.com/en/mcp/docs)):

- Read: `ver_reportes_tienda_wordpress` (`sales` or `top_sellers`, with `period` or `date_min`/`date_max`).
- Write (marked destructive because it includes refunds and deletions): `editar_tienda_wordpress` with `resource` and `action`.
- Webhooks: `editar_integraciones_wordpress` (`listar_webhooks`, `crear_webhook` with name, topic, delivery URL and secret, `eliminar_webhook`).
- Install the store: `instalar_app` with `app_type: wordpress` and `config.extras: ["woocommerce"]`, or `controlar_extensiones_wordpress` to add the plugin to an existing site.

Changing the site is required: an agent authorized as read-only does not see `editar_tienda_wordpress`.

## Related features

- [WordPress](https://ardumaker.com/en/docs/wordpress/)
- [Elementor](https://ardumaker.com/en/docs/elementor/)
- [MySQL](https://ardumaker.com/en/docs/mysql/)
- [Backups](https://ardumaker.com/en/docs/backups/)
