create_product
Create a new WooCommerce product with support for simple, variable, grouped, and external types. For variable products, specify attributes to enable variations.
Instructions
Create a new WooCommerce product. For variable products, set type='variable' and include attributes array, then use create_variation to add variants.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | SKU | |
| name | Yes | Product name | |
| tags | No | Tag IDs | |
| type | No | Product type | simple |
| brands | No | Brand IDs | |
| fields | No | Comma-separated fields to return in response | |
| images | No | Image URLs | |
| status | No | Product status | draft |
| weight | No | Weight | |
| virtual | No | Virtual product | |
| attributes | No | Product attributes (required for variable products) | |
| categories | No | Category IDs | |
| sale_price | No | Sale price | |
| description | No | Full description (HTML allowed) | |
| downloadable | No | Downloadable product | |
| manage_stock | No | Enable stock management | |
| stock_status | No | Stock status | |
| regular_price | No | Regular price | |
| stock_quantity | No | Stock quantity | |
| short_description | No | Short description | |
| default_attributes | No | Default variation attributes |