Get current order entity with routeMatch Wed, 02/24/2021 One more way to get current order is to use routeMatch like $route_name = \Drupal::routeMatch()->getParameter('commerce_order'); Drupal 8 Drupal 9 Commerce View the discussion thread.