The CouponManager clear() method is now invoked.

This commit is contained in:
Franck Allimant
2014-06-17 00:35:52 +02:00
parent 6b6687c85c
commit 17ad1ed6fa

View File

@@ -114,6 +114,9 @@ class Coupon extends BaseAction implements EventSubscriberInterface
*/ */
public function clearAllCoupons() public function clearAllCoupons()
{ {
// Tell coupons to clear any data they may have stored
$this->couponManager->clear();
$this->request->getSession()->setConsumedCoupons(array()); $this->request->getSession()->setConsumedCoupons(array());
} }
@@ -348,7 +351,7 @@ class Coupon extends BaseAction implements EventSubscriberInterface
} }
} }
// Clear all coupouns. // Clear all coupons.
$event->getDispatcher()->dispatch(TheliaEvents::COUPON_CLEAR_ALL); $event->getDispatcher()->dispatch(TheliaEvents::COUPON_CLEAR_ALL);
} }