Comments 1Michael started the conversation6 days ago on Saturday at 10:04amHello,how must i send composite products data to the WooCommerce Product API in order to create or update a composite product?Can you show me a minimal POST request how to achieve this?Thank you and best regardsMichael 1,561Dustin replied4 days ago on Monday at 3:52amHi Michael, We save the settings for the composite to post_meta like this: Therefore, you can update the settings as you wish. However, the data for the component products stored in 'wooco_components' is very complex. Here is an example: { "prry": { "name": "Component 01", "desc": "", "type": "products", "orderby": "default", "order": "default", "products": [ "_sku_woo-cap", "421" ], "optional": "yes", "price": "90%", "qty": "1", "custom_qty": "yes", "min": "0", "max": "1000", "m_min": "0", "m_max": "1000", "multiple": "yes", "selector": "list" }, "qv77": { "name": "Component 02", "desc": "", "type": "product_cat", "orderby": "default", "order": "default", "other": [ "music" ], "products": [ "_sku_woo-cap", "421" ], "exclude": [ "_sku_woo-album" ], "optional": "yes", "price": "", "qty": "1", "custom_qty": "yes", "min": "0", "max": "1000", "m_min": "0", "m_max": "1000", "multiple": "no", "selector": "default" } }Best regards,Dustin 1Michael replied1 day ago on Wednesday at 1:38pmThanks, Dustin1 Like Sign in to reply ...
Hello,
how must i send composite products data to the WooCommerce Product API in order to create or update a composite product?
Can you show me a minimal POST request how to achieve this?
Thank you and best regards
Michael
Hi Michael,
We save the settings for the composite to post_meta like this:
Therefore, you can update the settings as you wish. However, the data for the component products stored in 'wooco_components' is very complex. Here is an example:
{ "prry": { "name": "Component 01", "desc": "", "type": "products", "orderby": "default", "order": "default", "products": [ "_sku_woo-cap", "421" ], "optional": "yes", "price": "90%", "qty": "1", "custom_qty": "yes", "min": "0", "max": "1000", "m_min": "0", "m_max": "1000", "multiple": "yes", "selector": "list" }, "qv77": { "name": "Component 02", "desc": "", "type": "product_cat", "orderby": "default", "order": "default", "other": [ "music" ], "products": [ "_sku_woo-cap", "421" ], "exclude": [ "_sku_woo-album" ], "optional": "yes", "price": "", "qty": "1", "custom_qty": "yes", "min": "0", "max": "1000", "m_min": "0", "m_max": "1000", "multiple": "no", "selector": "default" } }Best regards,
Dustin
Thanks, Dustin