Thread Starter
evghe
(@evghe)
Maybe it’s not that clear, the prices will be set all to 0 in the response of the create order api call, and as said before the quantity will be reduced
Another thing is that also the other flag(let order only one product for order) isn’t working(i can order 2, 3 ecc)
Hi there,
I believe this may be related to the fact that Store Owners are able to create manual orders via the backend even for products with 0 stock and “Allow backorders?” set to NO — many store owners want to be able to have the power to create orders via the backend as they wish. For example they may not want customers to be able to purchase through the frontend of the site, but they might have an extra stock set aside in their shop that they want to be able to create a manual order for (without needing to adjust the stock to 1 and then quickly creating the order). This is discussed a bit in this GH issue here:
https://github.com/woocommerce/woocommerce/issues/25518
Similarly, with the Create Order endpoint of the REST API, store owners / developers would likely want to be able to create orders as desired, rather than being totally blocked based on product settings. Any code that is making use of the endpoint should do a check of the stock level and setting before creating the Order if they want it to conditionally create the order based on that.
Hi,
We’ve not heard back from you in a while, so I’m marking this thread as resolved. Hopefully, the above info was helpful.
If you have further questions, please feel free to open a new topic.
Thanks.