Unexpected key price_type for Product Add Ons Woocommerce Plugin API Call
-
We have thoroughly revised docs/api for Product Add Ons version 3.0.32 latest as of the date of this post (link to API Docs here).
So far we’ve been able to execute successfully some operations.
But we are finding the following difficulty: there’s no way to change price_type on the options of Product Add Ons plugin via API.
Automattic and Woocommerce don’t cover these specifics and when sending the price_type, e.g.:
PATCH {{wc-url}}/wp-json/wc-product-add-ons/v1/product-add-ons/{{product_id}}
{ "fields": [ { "name": "Extras Producto", "description": "", "type": "checkbox", "position": 0, "required": 0, "options": [ { "label": "Queso", "price": "675", "price_type": "flat_fee" }, { "label": "Aguacate", "price": "775", "price_type": "flat_fee" } ] } ] }
We get this error:
{ "code": "woocommerce_product_add_ons_rest__invalid_parameter", "message": "Invalid value given for 'fields': Invalid value given for 'options': Unexpected key 'price_type' was provided.", "data": { "status": 400 } }
IMAGE of this issue https://drive.google.com/file/d/1jKut-oNZd6yAiBbsc7obBwGyjmp9wAGv/view?usp=sharing
The page I need help with: [log in to see the link]
- The topic ‘Unexpected key price_type for Product Add Ons Woocommerce Plugin API Call’ is closed to new replies.