-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix caching bug when calculating available discounts #3902
base: 5.x
Are you sure you want to change the base?
Fix caching bug when calculating available discounts #3902
Conversation
To get this PR fix early, change your "require": {
"craftcms/commerce": "dev-feature/pt-2457-5x-discount-dont-work-if-custom-price-calculation-for as 5.3.3",
"...": "..."
} Then run We will update this PR once the release is out that includes this PR. |
[ci skip]
@@ -330,12 +343,12 @@ public function getAllActiveDiscounts(?Order $order = null): array | |||
|
|||
// Pre-qualify discounts based on purchase total | |||
if ($order) { | |||
if ($order->getEmail()) { | |||
if ($orderEmail) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this check if $orderEmail !== '*'
based on the code further up? Either that or leave this code as $order->getEmail()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I suppose it is already checking the $order
variable so should be fine
No description provided.