Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Enable deletion of expired jobs
// This will make sure expired jobs are deleted after XX days
add_filter( 'job_manager_delete_expired_jobs', '__return_true' );
// The default is 30 days, but you can change this with the following
add_filter( 'job_manager_delete_expired_jobs_days', 'change_job_manager_delete_expired_jobs_days' );
function change_job_manager_delete_expired_jobs_days() {
return 30; // change this to the number of days you desired

This comment has been minimized.

Copy link

bhuisman1992 commented May 17, 2017

This script doesn't work.. placed it in my functions..php and made a custom plugin for it. Both not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.