Description
The wsf_cookie_expiry filter hook can be used to override the Cookie Expiry setting in WS Form > Settings > Advanced. The returned value should be in seconds.
Usage
add_filter( 'wsf_cookie_expiry', 'my_hook_function', 10, 4 );
Parameters
Example
// Callback function for the wsf_cookie_expiry filter hook
function my_hook_function( $cookie_timeout, $cookie_name, $cookie_value, $form_id ) {
// Your code here ...
// Return value
return $cookie_timeout;
}
// Add a callback function for the wsf_cookie_expiry filter hook
add_filter( 'wsf_cookie_expiry', 'my_hook_function', 10, 4 );
Source File
This hook can be found in:<plugin root>/includes/class-ws-form-common.php