Closed redelschaap closed 4 years ago
Hi @redelschaap,
Thank you for reporting the issue. WooCommerce REST API is being developed in another repository: https://github.com/woocommerce/woocommerce-rest-api.
I am going to move your bug report there so that we could take a look there further.
@juliaamosova Thanks!
I have some new information: this happens only when you send the request with the following header: Content-Type: application/json
. When the request is sent with Content-Type
set to application/javascript
or text/plan
, the request is processed correctly.
While this is a (temporary) work around, we use the automattic/woocommerce package, which has the Content-Type
header set to application/json
hardcoded.
Had the same issue, fixed now in
WooCommerce 3.9.1 – 2020-01-28 REST API – Fixed – Product and variations schema to allow remove sale prices, dimensions and weight.
I can confirm that this is now fixed in 3.9.1 👍
Describe the bug We connect to a couple dozen of WooCommerce shops using the API. Since a few days, we get the following error when sending an empty string for the "sale_price" key on variations:
To Reproduce Steps to reproduce the behavior:
https://domain.com/wp-json/wc/v3/products/{productId}/variations/{variationId}
with valid data:Expected behavior Update the sale price with an empty value.
Isolating the problem (mark completed items with an [x]):
WordPress Environment