Skip to content

Instantly share code, notes, and snippets.

@mikejolley
Created December 11, 2015 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikejolley/27fe7edb343a078d97be to your computer and use it in GitHub Desktop.
Save mikejolley/27fe7edb343a078d97be to your computer and use it in GitHub Desktop.
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
}
@bhuisman1992
Copy link

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