Another spinoff from #3096883: [Backwards Compatibility break] Rework and expand ShippingRate. We currently have a @todo in ShippingRateWidget:

// @todo This should be done by selectRate() but the plugin doesn't
// have access to the parent entity ID yet.
$shipment->setShippingMethodId($shipping_method_id);

We want the plugin to have $this->parentEntity which can be passed down (to the ShippingRate, etc).

CommentFileSizeAuthor
#2 3106420-2-parent.patch5.18 KBbojanz
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bojanz created an issue. See original summary.

bojanz’s picture

Status: Active » Needs review
FileSize
5.18 KB

Here we go.

Ideally Commerce would give us ParentEntityAwareInterface, but we can fix that in a followup without breaking BC.

  • bojanz committed 07792c6 on 8.x-2.x
    Issue #3106420 by bojanz: Make shipping method plugins aware of their...
bojanz’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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