Description

A filter that is used to determine how many days should pass before Partial entries are deleted when using the Save and Resume addon.

Parameters

$expire_period
(int) (Required) Number of days to delete partial entries from the entries table.

Source

wpforms-save-resume/src/Tasks/DeleteExpiredEntriesTask.php

More Information

The wpforms_save_resume_tasks_deleteexpiredentriestask_expire_period filter is used to determine how many days should pass before partial entries should be removed from the form when using the Save and Resume addon.

Example

/*
 * Set number of days to delete partial entries when using the Save and Resume addon
 *
 * @link https://wpforms.com/developers/wpforms_save_resume_tasks_deleteexpiredentriestask_expire_period/
 * 
 * @param $expire_period Number of days to delete.
 *
 * return int
 */

function wpf_dev_delete_expired_entries( $expire_period ) {
 
    return '-15 days'; 

}

add_filter( 'wpforms_save_resume_tasks_deleteexpiredentriestask_expire_period', 'wpf_dev_delete_expired_entries' );