Skip to content

Commit

Permalink
Fix issue OpenMage#4401
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianaromagnoli authored Dec 9, 2024
1 parent c47df5b commit a28854b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/code/core/Mage/SalesRule/Model/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ protected function _canProcessRule($rule, $address)
return false;
}
// check coupon expiration
if ($coupon->hasExpirationDate() && ($coupon->getExpirationDate() < Mage::getModel('core/date')->date())) {
$couponExpirationDay = Mage::getModel('core/date')->date(Varien_Date::DATE_PHP_FORMAT, $coupon->getExpirationDate());
$today = Mage::getModel('core/date')->date(Varien_Date::DATE_PHP_FORMAT);
if ($coupon->hasExpirationDate() && ($couponExpirationDay < $today)) {
$rule->setIsValidForAddress($address, false);
return false;
}
Expand Down

0 comments on commit a28854b

Please sign in to comment.