Problem/Motivation

In Drupal\commerce_shipping\OrderShipmentSummary the view_mode parameter never used.

public function build(OrderInterface $order, $view_mode = 'user') {

at line 67 use always default

$summary['shipping_profile'] = $profile_view_builder->view($shipping_profile, 'default');

can you fix?
thank you

Comments

trickfun created an issue. See original summary.

jsacksick’s picture

It's used, the $view_mode parameter is the shipment $view_mode, not the profie view mode (see the code below):

      $summary[$index]['shipment'] = $shipment_view_builder->view($shipment, $view_mode);
jsacksick’s picture

Title: $view_mode not used in OrderShipmentSummary » Add an optional "$profile_view_mode" parameter to OrderShipmentSummary
Category: Bug report » Feature request

This can eventually be a feature request, not a bug report.