• Resolved evghe

    (@evghe)


    I have some products with backorders not allowed, when i’m on site it’s working fine (it doesn’l let create the order) but when i call che order REST api it creates the order and it’s setting product stock quantity to negative: so if i had 1 product in stock, a customer order 2, i will have -1 products
    I already tryed to deactivate all the others plugin except for woocommerce and the theme is already the wordpress default(as said in another thread not resolved but closed), another detail is that the order will have all the prices set to 0 if in backorder

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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)

    Plugin Support Kel C. a11n

    (@kellymetal)

    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.

    Plugin Support abwaita a11n

    (@abwaita)

    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.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Creating order from rest api ignoring backorder not allowed’ is closed to new replies.