gform_stripe_default_timeout_confirmation

Description

The gform_stripe_default_timeout_confirmation filter allows developers to filter the default timeout confirmation properties. This confirmation is displayed when the process of completing a Stripe payment is taking longer than expected.

Usage

add_filter( 'gform_stripe_default_timeout_confirmation', 'your_function_name', 10, 3 );

Parameters

ParameterTypeDescription
$timeout_confirmationarrayThe timeout confirmation object.
$formForm ObjectThe current form being processed.
$feedFeed ObjectThe current feed being processed.
array(
	'id'                                    => uniqid(),
	'name'                                  => esc_html__( 'Timeout Confirmation', 'gravityformsstripe' ),
	'type'                                  => 'message',
	'message'                               => esc_html__( 'The process of completing your payment is taking longer than expected. Contact us if you have any questions or concerns.', 'gravityformsstripe' ),
	'disableAutoformat'                     => false,
	'page'                                  => '',
	'url'                                   => '',
	'queryString'                           => '',
	'confirmation_conditional_logic_object' => array(
		'actionType' => 'show',
		'logicType'  => 'all',
		'rules'      => array(
			array(
				'fieldId'  => 'payment_status',
				'operator' => 'is',
				'value'    => 'Processing',
			),
		),
	),
	'confirmation_conditional_logic'        => '1',
	'conditionalLogic'                      => array(
		'actionType' => 'show',
		'logicType'  => 'all',
		'rules'      => array(
			array(
				'fieldId'  => 'payment_status',
				'operator' => 'is',
				'value'    => 'Processing',
			),
		),
	),
);

Examples

Change the default timeout confirmation message.

add_filter( 'gform_stripe_default_timeout_confirmation', 'change_timeout_message', 10, 3 );
function change_timeout_message( $timeout_confirmation, $form, $feed ) {
	$timeout_confirmation['message'] = 'Your payment is still processing. Please check your email shortly for confirmation.';
	return $timeout_confirmation;
}

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

apply_filters( 'gform_stripe_default_timeout_confirmation', $timeout_confirmation, $form, $feed );

This filter is located in get_default_timeout_confirmation() in includes/elements/class-elements-handler.php.

Since

This filter was added in Gravity Forms Stripe Add-On 6.0.