Commerce Checkout previously had a 'commerce_checkout.checkout.complete' event (receiving a CheckoutCompleteEvent object).
This event only fired when the customer completed checkout on the frontend, but not when the admin placed an order through the backend. However, most use cases (such as sending a confirmation email) require it to be triggered in both cases.
The state_machine module now dispatches pre_transition and post_transition events that should be used instead.
You can use the 'commerce_order.place.pre_transition' event to react before the order is saved, or 'commerce_order.place.post_transition' to react after the order has been saved. Both events use the \Drupal\state_machine\Event\WorkflowTransitionEvent class, with a getEntity() method that gives you the order.
Comments
Site issue when I ask for items
Calling $order = $event->getEntity();$order->getItems(); results in my site hanging - no error message - just lots of processing.
I've worked around it (using queue with order id) but wondered where best to report?