You are here

abstract protected function ShipmentPromotionOfferBase::applyToShipment in Commerce Shipping 8.2

Applies the offer to the given shipment.

Parameters

\Drupal\commerce_shipping\Entity\ShipmentInterface $shipment: The shipment.

\Drupal\commerce_promotion\Entity\PromotionInterface $promotion: The parent promotion.

1 call to ShipmentPromotionOfferBase::applyToShipment()
ShipmentPromotionOfferBase::apply in src/Plugin/Commerce/PromotionOffer/ShipmentPromotionOfferBase.php
Applies the offer to the given entity.
2 methods override ShipmentPromotionOfferBase::applyToShipment()
ShipmentFixedAmountOff::applyToShipment in src/Plugin/Commerce/PromotionOffer/ShipmentFixedAmountOff.php
Applies the offer to the given shipment.
ShipmentPercentageOff::applyToShipment in src/Plugin/Commerce/PromotionOffer/ShipmentPercentageOff.php
Applies the offer to the given shipment.

File

src/Plugin/Commerce/PromotionOffer/ShipmentPromotionOfferBase.php, line 232

Class

ShipmentPromotionOfferBase
Provides the base class for shipment offers.

Namespace

Drupal\commerce_shipping\Plugin\Commerce\PromotionOffer

Code

protected abstract function applyToShipment(ShipmentInterface $shipment, PromotionInterface $promotion);