return;
} // if there is no collected promotion we may return - nothing to calculate!
if (!
$data->
has(self::DATA_KEY
)) { $lineItemPromotions =
$original->
getLineItems()->
filterType(self::LINE_ITEM_TYPE
);
foreach ($lineItemPromotions as $lineItemPromotion) { if (empty($lineItemPromotion->
getReferencedId())) { $toCalculate->
addErrors( new AutoPromotionNotFoundError($lineItemPromotion->
getLabel() ??
$lineItemPromotion->
getId()) );
} } return;
} /** @var LineItemCollection $discountLineItems */
$discountLineItems =
$data->
get(self::DATA_KEY
);
// calculate the whole cart with the