Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create a WooCommerce Mix and Match product with it's settings
curl -X POST https://example.com/wp-json/wc/v3/products \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
"name": "Sample Six Pack",
"type": "mix-and-match",
"regular_price": "0",
"description": "So many products to choose from.",
"short_description": "Pick 6.",
"categories": [
{
"id": 9
}
],
"mnm_child_items": [
{
"product_id": 7
},
{
"product_id": 9
},
{
"product_id": 14
},
{
"product_id": 16
},
{
"product_id": 17
},
{
"product_id": 10,
"variation_id": 12
}
],
"mnm_layout": "grid",
"mnm_min_container_size": 6,
"mnm_max_container_size": 6,
"mnm_discount": "25",
"mnm_priced_per_product": true,
"mnm_shipped_per_product": false
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment