royal-mcp__wc_create_order
Create a WooCommerce order programmatically. Use for B2B, wholesale, phone orders, manual invoicing. Stock is decremented only when status transitions into processing/completed — create as pending, then update status to processing to trigger stock reduction. Order emails are NOT auto-fired; pass send_emails=true to trigger the New Order email. (site: demo.royalplugins.com) Through Royally: waits for a person to approve it in Royally; nothing on the site changes until then.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Initial order status (default pending). Accepted: pending, processing, on-hold, completed, cancelled. | |
| billing | No | Billing address: first_name, last_name, address_1, address_2, city, state, postcode, country, email, phone. | |
| site_id | No | Site to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com) | |
| shipping | No | Shipping address (same shape as billing, minus email/phone). | |
| fee_lines | No | Optional fee lines. Array of {name, total}. | |
| meta_data | No | Optional custom order meta. Array of {key, value}. | |
| line_items | Yes | Array of {product_id, quantity, variation_id?}. variation_id must belong to product_id. | |
| customer_id | No | Optional WP user ID for the customer. Omit to create a guest order. | |
| send_emails | No | If true, fire the WC New Order email after creation. Default false. | |
| customer_note | No | Customer-facing note attached to the order. | |
| payment_method | No | Payment method ID (e.g. bacs, cheque, cod, stripe). | |
| shipping_lines | No | Optional shipping lines. Array of {method_id, method_title, total}. |