Changing form token cache time
-
Hi;
I was searching a way to solve the incompatibility of cache time of your token and my cache plugin and I found this article on your website:
https://wpforms.com/developers/how-to-change-the-cache-time-on-your-form-token/
I want to apply that, but I don’t understand exactly what I have to write on the php inserter. If I want to allow a token cache for one week, should I use the next code?
add_filter( 'wpforms_form_token_check_before_today', 'example_add_longer_token_time_before' ); /** * Extend the expiration time. */ function example_add_longer_token_time_before( $times ) { // Allow the token to persist for 5 days $times[] = 7 * DAY_IN_SECONDS; }
If not, could you please help me to solve that.
Thank you in advance.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Changing form token cache time’ is closed to new replies.