Skip to content

Commit a0eb5a2

Browse files
committed
Fix the missing discounts.
(cherry picked from commit 8443ccd)
1 parent 1bbcfdc commit a0eb5a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Util/OrderLine.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ public static function createForSurcharge(ProductCollectionSurcharge $surcharge)
171171
$self = new self();
172172
$self->setSurcharge($surcharge);
173173

174-
if ($surcharge instanceof ProductCollectionSurcharge\Rule && 'subtotal' !== $surcharge->applyTo) {
174+
if ($surcharge instanceof ProductCollectionSurcharge\Rule
175+
&& $surcharge->type === 'product'
176+
&& 'subtotal' !== $surcharge->applyTo) {
175177
// In case that the rule applies to the product, we need to alter the $total_discount_amount instead
176178
return null;
177179
}

0 commit comments

Comments
 (0)