Fix coupon code activation

New PR based on fixing coupon activation discussed in issue 3222.