Skip to content

Commit

Permalink
Fixes customer group in Discounts (#2046)
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirmturk authored Jan 6, 2025
1 parent 53605c6 commit 1952a4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core/src/Managers/DiscountManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ public function getDiscounts(?Cart $cart = null): Collection
$this->channel($defaultChannel);
}

if ($cart && $customerGroups = $cart->customer?->customerGroups) {
$this->customerGroup($customerGroups);
}

if ($this->customerGroups->isEmpty() && $defaultGroup = CustomerGroup::getDefault()) {
$this->customerGroup($defaultGroup);
}
Expand Down

0 comments on commit 1952a4a

Please sign in to comment.