I need a custom order workflow that is dependent on the customer address.
I know I can define different order types with custom workflows, but this doesnt help as ultimately this is dictated by the products.
Basically I need to have a shipping method with a condition of postcodes, if a customer is placing an order and this shipping method is selected then the order needs to be received as pending for review by the store administrator before the order is accepted.
They key point is that some orders will go thorugh a default workflow and the order is completed on checkout, but other orders must not be completed and must wait to be accepted, and this is based on the postcode of the customer address. I know this would be easy to configure if all orders went through the same workflow, or if it was based on the products.
I think i will need to write some code in an event subscriber, but at what point and where do I hook into the checkout process where I can check the shipping method but also put the order into a "waiting to be accepted" state? I dont think I can just change the order type in an event susbscriber when its already going through a transition?