// deliveries have their own processor and calculator
if ($discountItem->
getPayloadValue('discountScope'
) === PromotionDiscountEntity::SCOPE_DELIVERY
) { continue;
} $isAutomaticDiscount =
$this->
isAutomaticDiscount($discountItem);
// we have to verify if the line item is still valid
// depending on the added requirements and conditions.
if (!
$this->
isRequirementValid($discountItem,
$calculated,
$context)) { // hide the notEligibleErrors on automatic discounts
if (!
$isAutomaticDiscount) { $this->
addPromotionNotEligibleError($discountItem->
getLabel() ??
$discountItem->
getId(),
$calculated);
} continue;
} // if promotion is on exclusions stack it is ignored
if (!
$discountItem->
hasPayloadValue('promotionId'
)) { continue;
}