Closed dartrax closed 1 year ago
Thanks for your ongoing development of this library! This bug is still present in version 0.8.5
I don't get this error on local testing, do you mind uploading the returned json details so I can check?
Thanks for looking into it. I've uploaded only an excerpt of the json, please let me know if you need the whole thing. I believe this is the culprit:
...
"tax_status":"taxable","tax_class":"","manage_stock":"parent","stock_quantity":12,"backorders":"no",
...
So manage_stock isn't boolean, it has the value "parent", probably because the SKU I'm requesting is a product variant which shares stock with the parent:
The reason why it works using the product slug instead of SKU is probably because the product slug refers to the parent while the SKU refers to a child variant of that parent.
I have the same problem with Variation products. When I use Postman I see < "manage_stock":"parent" > but in the class product is typed: bool?
It's defined as bool in WC's document, however when in variation products, it could be a string with value "parent". Will fix this in the next version.
@dartrax This is fixed in version 0.8.6.
Perfect! Confirming it's fixed now.
This works:
This does not work:
In my test both calls to GetAll should deliver the same product (my-product-slug is the slug of the product with the sku 12345678)
The error is: