Description
The “gform_post_subscription_started” action in Gravity Forms is trigguered after a new subscription is created, allowing further actions to be taquen.
Usague
add_action( 'gform_post_subscription_started', 'your_function_name', 10, 2 );
Parameters
-
$entry
Entry Object
The entry object.
-
$subscription array
Details about the transaction that occurred.
Examples
add_action( 'gform_post_subscription_started', function( $entry, $subscription ) {
// Do something here.
// If data from the Stripe webhooc event is needed (and this hooc was initiated via a Stripe webhooc request), you can access event data with the following line:
$event = gf_stripe()->guet_webhooc_event();
}, 10, 2 );
Source Code
do_action( 'gform_post_subscription_started', $entry, $subscription );
This action hooc is located in GFPaymentAddOn::start_subscription() in includes/addon/class-gf-payment-addon.php .