V3 – Problem with inserting variable product
-
When I insert a variable product the attributes options turns into lowercase inside the variations array but inside the attributes of parent product they still capitalized.
Request:
{ "product": { "title": "Bla bla bla", "type": "variable", "enable_html_description": true, "sku": "V2058", "attributes": [ { "name": "Cor", "slug": "cor", "position": 0, "visible": true, "variation": true, "options": [ "Preto", "Branco" ] } ], "variations": [ { "regular_price": "264.96", "attributes": { "cor": { "name": "Cor", "slug": "cor", "option": "Preto" } }, "dimensions": { "length": "0", "width": "0", "height": "0" }, "weight": "0", "sku": 2058, "in_stock": false, "id": 3535 }, { "regular_price": "264.96", "attributes": { "cor": { "name": "Cor", "slug": "cor", "option": "Branco" } }, "dimensions": { "length": "0", "width": "0", "height": "0" }, "weight": "0", "sku": 1958, "in_stock": false } ], "catalog_visibility": "visible" } }
Response from woocommerce:
{ "product": { "title": "Bla bla bla", "id": 3534, "type": "variable", "attributes": [ { "name": "Cor", "slug": "cor", "position": 0, "visible": true, "variation": true, "options": [ "Branco", "Preto" ] } ], "variations": [ { "id": 3535, "created_at": "2016-07-27T20:50:43Z", "updated_at": "2016-08-10T18:39:24Z", "downloadable": false, "virtual": false, "permalink": "https://www.f2iluminacao.com.br/loja/abajur/abajur-vela-metal-e-tecido-preto-arquitetizze-ab1201-1-000/?attribute_pa_cor=preto", "sku": "2058", "price": "264.96", "regular_price": "264.96", "sale_price": null, "taxable": false, "tax_status": "taxable", "tax_class": "", "managing_stock": false, "stock_quantity": "", "in_stock": false, "backordered": false, "purchaseable": true, "visible": true, "on_sale": false, "weight": null, "dimensions": { "length": "0", "width": "0", "height": "0", "unit": "cm" }, "shipping_class": "", "shipping_class_id": null, "image": [ { "id": 4750, "created_at": "2016-08-10T17:49:29Z", "updated_at": "2016-08-10T17:49:29Z", "src": "https://www.f2iluminacao.com.br/wp-content/uploads/1673.jpg", "title": "", "alt": "", "position": 0 } ], "attributes": [ { "name": "Cor", "slug": "cor", "option": "preto" } ], "downloads": [], "download_limit": 0, "download_expiry": 0 }, { "id": 4776, "created_at": "2016-07-27T20:50:43Z", "updated_at": "2016-08-10T18:39:24Z", "downloadable": false, "virtual": false, "permalink": "https://www.f2iluminacao.com.br/loja/abajur/abajur-vela-metal-e-tecido-preto-arquitetizze-ab1201-1-000/?attribute_pa_cor=branco", "sku": "1958", "price": "264.96", "regular_price": "264.96", "sale_price": null, "taxable": false, "tax_status": "taxable", "tax_class": "", "managing_stock": false, "stock_quantity": "", "in_stock": false, "backordered": false, "purchaseable": true, "visible": true, "on_sale": false, "weight": null, "dimensions": { "length": "0", "width": "0", "height": "0", "unit": "cm" }, "shipping_class": "", "shipping_class_id": null, "image": [ { "id": 1016, "created_at": "2016-07-06T21:59:49Z", "updated_at": "2016-07-06T21:59:49Z", "src": "https://www.f2iluminacao.com.br/wp-content/uploads/17651.jpg", "title": "", "alt": "", "position": 0 } ], "attributes": [ { "name": "Cor", "slug": "cor", "option": "branco" } ], "downloads": [], "download_limit": 0, "download_expiry": 0 } ], }
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘V3 – Problem with inserting variable product’ is closed to new replies.