Created
December 11, 2015 16:01
-
-
Save mikejolley/27fe7edb343a078d97be to your computer and use it in GitHub Desktop.
Enable deletion of expired jobs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script doesn't work.. placed it in my functions..php and made a custom plugin for it. Both not working