'transactions.stateMachineState',
'transactions.paymentMethod',
'deliveries.stateMachineState',
'currency',
'addresses.country',
'tags',
'documents',
]);
$criteria->
getAssociation('transactions'
)->
addSorting(new FieldSorting('createdAt'
));
$event =
new BeforeLoadStorableFlowDataEvent( OrderDefinition::ENTITY_NAME,
$criteria,
$context,
);
$this->dispatcher->
dispatch($event,
$event->
getName());
$order =
$this->orderRepository->
search($criteria,
$context)->
get($orderId);
if ($order) { /** @var OrderEntity $order */