gform_ppcp_intent

Description

The “gform_ppcp_intent” filter in the Gravity Forms PayPal Checkout Add-On allows the payment intent to be overridden.

Usage

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

Parameters

  • $intent string

    The payment intent. Default is capture. Possible values: capture or authorize.

  • $form_id int

    The ID of the current form.

  • $feed_id int

    The ID of the current feed.

Examples

add_filter( 'gform_ppcp_intent', 'change_intent', 10, 3 );
function change_intent( $intent, $form_id, $feed_id ) {
	return 'authorize';
}

Placement

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

Source Code

return apply_filters( 'gform_ppcp_intent', 'capture', $form_id, $feed_id );

This filter is located in GF_PPCP::get_intent() in class-gf-ppcp.php.