For info, screenshots attached show expiration settings in Toolset > Settings > Forms, and an example post whose expiration was set via a form submission - expiration in the past, but Post Status isn't changing to 'Trash'.
Hi Luo,
I've done a little experimentation, and it looks to me like something is messing up the Toolset settings.
I have checked the Forms Settings for post expiration check on another site, and they show options of 'Once Hourly', 'Once Daily', 'Twice Daily', 'Once Weekly'. When I look at the site with the problem, it looks like the attached.
I am concerned that there may be a variable name duplication with another plugin, or some such, causing invalid options to appear?
I have selected one of the options that matches the Toolset ones, and we'll see if that causes an expiration to occur - just need to wait an hour to see if that works. But if there is a variable duplication, it would be worth making that unique at some point in the dev cycle...
Thanks for the update.
Toolset Forms plugin is using WordPress function wp_schedule_event() to register Cron jobs:
https://developer.wordpress.org/reference/functions/wp_schedule_event/
WordPress supports only four kind of recurrence by default:
- hourly
- twicedaily
- daily
- weekly
It seems other plugins/theme if your website causing invalid options to appear.
Please update here if you still need assistance for it.
Hi Luo,
Just to reassure you, when I chose one of the four standard options (I chose 'Once Hourly'), the post expired correctly and the status changed. As you say, clearly another plugin is registering options in this array which show up in the settings dropdown but aren't valid options for triggering the Toolset cron job.
My issue is resolved now. Thank you!