I know how to load an order by its ID using \Drupal\commerce_order\Entity\Order::load($order_id)
. I added a custom field (Token ID) to the orders.
How can I load the orders knowing the value of that field? If I want to get the state of the order, how can I achieve it?