/** * Gets the workflow for the state field. * * @param \Drupal\commerce_order\Entity\OrderInterface $order * The order. * * @return string * The workflow id. */ public static function getWorkflow(OrderInterface $order) { $workflow = OrderType::load($order->bundle())->getWorkflow(); return $workflow; }