We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1bbcfdc commit a0eb5a2Copy full SHA for a0eb5a2
src/Util/OrderLine.php
@@ -171,7 +171,9 @@ public static function createForSurcharge(ProductCollectionSurcharge $surcharge)
171
$self = new self();
172
$self->setSurcharge($surcharge);
173
174
- if ($surcharge instanceof ProductCollectionSurcharge\Rule && 'subtotal' !== $surcharge->applyTo) {
+ if ($surcharge instanceof ProductCollectionSurcharge\Rule
175
+ && $surcharge->type === 'product'
176
+ && 'subtotal' !== $surcharge->applyTo) {
177
// In case that the rule applies to the product, we need to alter the $total_discount_amount instead
178
return null;
179
}
0 commit comments