Get WooCommerce Product Variation
woocommerce_get_product_variationRetrieve complete details of a product variation by providing its parent product ID and variation ID. Get attributes, pricing, stock, and more in markdown or JSON format.
Instructions
Retrieve full details for a single product variation.
Args:
product_id (number, required): parent product ID
variation_id (number, required): variation ID
response_format ('markdown'|'json'): default 'markdown'
Returns: Full variation object including attributes, pricing, and stock.
Error Handling:
Returns "Error: Resource not found (404)" if either ID is wrong or the variation doesn't belong to that product.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| product_id | Yes | The parent variable product's numeric ID | |
| variation_id | Yes | The variation's numeric ID | |
| response_format | No | Output format: 'markdown' for human-readable text or 'json' for machine-readable structured data | markdown |