Skip to content

Instantly share code, notes, and snippets.

@New0
Last active May 8, 2020 10:20
Show Gist options
  • Save New0/f6c04b651b3b5d2435e401bc2a6bacc4 to your computer and use it in GitHub Desktop.
Save New0/f6c04b651b3b5d2435e401bc2a6bacc4 to your computer and use it in GitHub Desktop.
Set custom duration for Caldera Forms Stripe sessions to be correctly recorded ( since add-on version 1.4.11 )
<?php
/**
* Plugin Name: Stripe session transients duration
* Description: Customize duration for Form entries to be stored.
* Author: New0
*
*/
//Set the time in seconds ( here 15 * 60 converts to 15 minutes )
add_filter("cf_stripe_transients_status_duration", function() {
return 15 * 60;
});
add_filter("cf_stripe_transients_capture_duration",function() {
return 15 * 60;
});
add_filter("cf_stripe_transients_session_duration", function() {
return 15 * 60;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment