Skip to content

Commit

Permalink
fixed the minSpend condition on Discount (#823)
Browse files Browse the repository at this point in the history
Co-authored-by: mouhcine <m.kachibal@gmail.com>
  • Loading branch information
0xenm21 and mouhcine007 authored Jan 24, 2023
1 parent 10ce12d commit f9d356a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/DiscountTypes/Discount.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function apply(Cart $cart): Cart

$lines = $this->getEligibleLines($cart);

if (! $passes || ($minSpend && $minSpend < $lines->sum('subTotal.value'))) {
if (! $passes || ($minSpend && $minSpend >= $lines->sum('subTotal.value'))) {
return $cart;
}

Expand Down

0 comments on commit f9d356a

Please sign in to comment.