// @todo ->add() should perform unit conversions automatically.
        $shipment_item_weight = $shipment_item_weight->convert($weight->getUnit());
        $weight = $weight->add($shipment_item_weight);

Physical 1.0 does the conversion automatically, so we can remove the convert line and the todo above it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bojanz created an issue. See original summary.

mitrpaka’s picture

Status: Active » Needs review
FileSize
801 bytes

Patch applied - Removes both convert lines ($shipment_item_weight and $package_type_weight)

  • bojanz committed bbcfb47 on 8.x-2.x authored by mitrpaka
    Issue #3012518 by mitrpaka: Update for Physical 1.0
    
bojanz’s picture

Status: Needs review » Fixed

Thanks!

Added an additional change to simplify the if/else a bit more and committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.