Categories
CMS Development Wordpress

Move to trash custom post type post after ACF Date Picker date is older than today

I have a custom post type called ‘aktualitates’ and I have a date picker field on the posts from the Advanced Custom Fields plugin with the field name ‘aktuali_expire’. I tried adding a code from another question to functions.php, but it doesn’t seem to work for me. I am positive, that the time values are […]

Categories
CMS Development Wordpress

Move to trash custom post type post after ACF Date Picker date is older than today

I have a custom post type called ‘aktualitates’ and I have a date picker field on the posts from the Advanced Custom Fields plugin with the field name ‘aktuali_expire’. I tried adding a code from another question to functions.php, but it doesn’t seem to work for me. I am positive, that the time values are […]

Categories
Development WooCommerce Wordpress

How to trash expired and used coupons in Woocommerce automatically?

In my functions.php I want to add a function that moves expired coupons and/or coupons that have reached their usage limit to the trash. I would like to trash coupons that have a usage limit of 1 and a usage count of 1 or more. I would like this function to run on a daily […]