I am trying to get the individual line items of an order to fulfil individually as this feature is currently not available in Wix.
In the OnNewOrder the event that is passed to it does not have any line item. So I query the “Stores/Orders” table to get the line items. But the query does not return any result.
I checked https://www.wix.com/corvid/forum/community-discussion/stores-order-hooks-not-working?origin=auto_suggest
and
https://support.wix.com/en/article/corvid-wix-stores-orders-collection-fields
They do not have any solution
This is the code
let OrderId = event.orderId;
let DBOptions = {"suppressAuth": true};
let OrderResult = await wixData.query("Stores/Orders",DBOptions)
.eq("_id",OrderId)
.find();
let OrderlineItems = OrderResult.items[0].lineItems;
Can someone from support please respond
I submitted a ticket I did not get any solution but was told that the OnNewOrder and inserting to Orders table happen concurrently. So not sure if the line items can be queried.
Could someone please help with this it has been going on and on for almost 3 weeks without any solution