create_order
Create a new WooCommerce order by specifying line items with product IDs and quantities. Supports variations, customer details, billing/shipping addresses, and payment status.
Instructions
Create a new order. Requires line_items with product_id and quantity. Use variation_id for variable product variants.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"line_items": "<line_items>"
},
"name": "create_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Comma-separated fields to return in response | |
| status | No | Order status | |
| billing | No | Billing address | |
| set_paid | No | Mark order as paid | |
| shipping | No | Shipping address | |
| line_items | Yes | Order line items | |
| customer_id | No | Customer ID (0 for guest) | |
| payment_method | No | Payment method ID | |
| payment_method_title | No | Payment method title |