We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3427a3 commit 8443ccdCopy full SHA for 8443ccd
src/Util/OrderLine.php
@@ -193,7 +193,9 @@ public static function createForSurcharge(ProductCollectionSurcharge $surcharge)
193
$self = new self($connection);
194
$self->setSurcharge($surcharge);
195
196
- if ($surcharge instanceof ProductCollectionSurcharge\Rule && 'subtotal' !== $surcharge->applyTo) {
+ if ($surcharge instanceof ProductCollectionSurcharge\Rule
197
+ && $surcharge->type === 'product'
198
+ && 'subtotal' !== $surcharge->applyTo) {
199
// In case that the rule applies to the product, we need to alter the $total_discount_amount instead
200
return null;
201
}
0 commit comments