gform_stripe_fulfillment

Description

Allows custom actions to be performed after a checkout session is completed.

Usage

do_action( 'gform_stripe_fulfillment', $session, $entry, $feed, $form );

Parameters

  • $session array

    The session object.

  • $entry array

    The entry object.

  • $feed array

    The feed object.

  • $form array

    The form object.

Example

This example shows how to notify the site admin when a Stripe Checkout session has been completed successfully.

add_action( 'gform_stripe_fulfillment', 'notify_on_checkout_success', 10, 4 );
function notify_on_checkout_success( $session, $entry, $feed, $form ) {

	$admin_email = get_bloginfo( 'admin_email' );
	wp_mail( $admin_email, 'Payment via Stripe Checkout successful!', 'Message about the successful payment' );

}

Placement

This code should be placed in the functions.php file of your active theme.

Since

This filter was added in Stripe v3.1.

Source Code

This filter is located in class-gf-stripe.php.