Update 03 February 2021: Script tested and confirmed working on WooCommerce 4.9.2.
Coupons are amazing, who does not like a discount? A very common way to give coupons to customers is to create one automatically after their first order, or something like that.
The issue with that though is that usually these coupons expire after a specific period, and by default, WooCommerce will not delete them. They have no reason to stay in your database though, so how do we delete expired coupons automatically?Read more