Skip to content

Commit 8443ccd

Browse files
committed
Fix the missing discounts.
1 parent d3427a3 commit 8443ccd

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
@@ -193,7 +193,9 @@ public static function createForSurcharge(ProductCollectionSurcharge $surcharge)
193193
$self = new self($connection);
194194
$self->setSurcharge($surcharge);
195195

196-
if ($surcharge instanceof ProductCollectionSurcharge\Rule && 'subtotal' !== $surcharge->applyTo) {
196+
if ($surcharge instanceof ProductCollectionSurcharge\Rule
197+
&& $surcharge->type === 'product'
198+
&& 'subtotal' !== $surcharge->applyTo) {
197199
// In case that the rule applies to the product, we need to alter the $total_discount_amount instead
198200
return null;
199201
}

0 commit comments

Comments
 (0)