Created
July 25, 2020 17:17
-
-
Save helgatheviking/60c8abcf28a891c24584ad81b0ea6bdd to your computer and use it in GitHub Desktop.
Create a WooCommerce Mix and Match product with it's settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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