Home / Admin / Decrease the retention period to one week for the Action Scheduler
Duplicate Snippet

Embed Snippet on Your Site

Decrease the retention period to one week for the Action Scheduler

By default, Action Scheduler will automatically remove completed tasks after thirty days. However, this time period can be changed with the action_scheduler_retention_period filter.

<10
Code Preview
php
<?php
/* 
Decrease the retention period to one week for the Action Scheduler
Original doc link: https://wpforms.com/docs/how-to-troubleshoot-action-scheduler-issues-in-wpforms/
For support, please visit: https://www.facebook.com/groups/wpformsvip
*/
function custom_as_retention_period() {
    return WEEK_IN_SECONDS;
}
add_filter( 'action_scheduler_retention_period', 'custom_as_retention_period' );

Comments

Add a Comment