I have a plugin that does additional processing when an order is created. I am using the IConsumer<EntityUpdated<Order>> to handle the order event.
I need to look through the orderitems to check product categories but there seems to be a bug with the number of products when the order is first created.
Here's how I can reproduce the problem:
- I place 3 different products in the cart and go through the checkout process.
- When I click on the confirm button, the order is created and the EntityUpdated<Order> is triggered.
- Looking in the EntityUpdated.OrderItems there is only 1 order item - there should be 3!
However, if I go to the admin panel to update the order, 3 orderitems are in the order when the event is triggered.
Is this normal behaviour?