1. Home
  2. Knowledge Base
  3. WP Optin Wheel
  4. How to's
  5. How to set a WooCommerce coupon to expire on a fixed date

How to set a WooCommerce coupon to expire on a fixed date

You may have noticed that the WP Optin Wheel settings only allow to expire coupons X hours, minutes or days from the time it was won. If you don’t want that but you rather want all coupons to expire on a fixed date, you can add a piece of PHP code to your functions.php file:

This content is restricted to premium users

In the example above, all generated coupons will expire on May 31st, 2022. Make sure to change both occurrences of 31 May 2022 to the date you need.

Was this article helpful?

Related Articles