Tag Info

New answers tagged

0

I did something similar a while ago. I'm not sure deleting a post is a good solution, maybe you can change only the post status to a custom one called Expired for example. But for an example, the code below will delete the post. First create a daily cron job: add_action( 'wp', 'delete_expired_coupons_daily' ); function delete_expired_coupons_daily() { ...



Top 50 recent answers are included