I want to write a plugin which writes all the order data into a CSV file. Unfortunately the documentation for Commerce 2 isn't quite complete yet so I have difficulties to find out how to do the following with a plugin (so I need to use PHP and not Twig).
- Get an order by ID.
- Get ordered items.
- Get the addresses for the order.
Every help appreciated.