Aaron Axelsen
Forum Replies Created
-
I have not tested the plugin with woocommerce, so I’m not sure what is going on there. Sounds like there is something not working correctly. Have you invested what those product ID’s are? Are they all unique products or are some of those ID’s actually drafts?
Everything in the WordPress core does use UTC time – so that is normal on the backend.
@blankride do any other cron processes work? For example, if you create a post that is scheduled to be published in the future, does that publish correctly?
No problem. This will be available in the next release. Cheers!
How are you setting the expiration options? Are you using the built in box on the post edit screen, or are you doing something custom to set the values?
The delete option does just that – completely deletes the post. I could easily add in a “Trash” expire option as well if desired.
@aislingrasdale That is just a strict error that I will get resolved. Can you make sure you have debugging enabled, and then try to schedule and expire a post and let me know what you see in the debug log?
what does the debug log show when attempting to expire posts?
what does the debug log show when attempting to expire posts?
Wherever you are trying to currently update the meta, just replace that code with a variation of this:
$expiration_date = get_post_meta($id, '_expiration-date', true); if ($expiration_date) { $opts = array(); $opts['expireType'] = 'delete'; $opts['id'] = $id; echo "Setting expiration date for post " . $id . " to the timestamp " . $expiration_date; _scheduleExpiratorEvent( $id, $expiration_date, $opts ); } else { echo "No expiration date set for post " . $id . ". Exiting"; }
You can also do font-weight: bold;
Good catch! That has apparently been wrong for years. Thanks!
You can’t just add the meta data – that does not actually set the cron events. With your import process, you’ll need to run the “_scheduleExpiratorEvent($id,$ts,$opts)” function which will solve your problem.
You will need to manually build the “opts” array – easiest way may be to just copy it from a different post for what you want, and then just update the post id.
Hope that helps.
Are you referring to in the admin dashboard? If so – this feature will be available in the upcoming release!
Actually, you can set a date in the paste and the next time cron runs, it will process the paste date and expire the post as configured.
It works fine with 4.7.4 – so you should be set!