Description
The gform_stripe_submission_timeout_seconds
filter enables users to change the time (in seconds) that the form submission will wait for the Stripe webhook before displaying the Timeout confirmation.
Usage
The following would apply to all forms.
add_filter( 'gform_stripe_submission_timeout_seconds', 'custom_function', 10, 2 );
To target a specific form append the form id to the hook name. (format: gform_stripe_submission_timeout_seconds_FORMID)
add_filter( 'gform_stripe_submission_timeout_seconds_123', 'custom_function', 10, 2 );
Parameters
Parameter | Type | Description |
---|---|---|
$timeout_seconds | integer | The timeout in seconds that the form submission will wait for a response from the Stripe webhook. Defaults to 20. |
$form | array | The form object. |
Examples
Customize Stripe Webhook Timeout Duration
add_filter( 'gform_stripe_submission_timeout_seconds_123', 'custom_stripe_timeout_for_form_123', 10, 2 );
function custom_stripe_timeout_for_form_123( $timeout_seconds, $form ) {
return 60; // Extend to 60 seconds for form ID 123
}
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Source Code
This filter is located in includes/elements/config/class-gf-stripe-elements-config.php
Since
This filter was added in the Stripe Add-On 6.0