From a28854b626efc86efa2382bbe7bbc6b48fa8c66e Mon Sep 17 00:00:00 2001 From: Fabiana Romagnoli Date: Mon, 9 Dec 2024 14:34:06 +0100 Subject: [PATCH] Fix issue #4401 --- app/code/core/Mage/SalesRule/Model/Validator.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/core/Mage/SalesRule/Model/Validator.php b/app/code/core/Mage/SalesRule/Model/Validator.php index 144eb681e87..9bd2e0ba2f7 100644 --- a/app/code/core/Mage/SalesRule/Model/Validator.php +++ b/app/code/core/Mage/SalesRule/Model/Validator.php @@ -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; }