Description
This filter is used to cancel to IPN processing.
Usage
add_filter( 'gform_paypal_pre_ipn', 'your_function_name', 10, 4 );
Parameters
- $cancel boolean
False by default. Return as true to cancel IPN processing.
-
$_POST array
The $_POST array posted by the PayPal IPN.
-
$entry Entry Object
The entry from which the transaction the IPN is responding to was submitted.
-
$feed Feed Object
The PayPal feed configuration data used to process the entry the IPN is responding to.
Examples
This example shows how to return a false value and cancel the IPN processing.
add_filter( 'gform_paypal_pre_ipn', 'cancel_ipn' ); function cancel_ipn( $cancel ) { return true; }
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
apply_filters( 'gform_paypal_pre_ipn', false, $_POST, $entry, $feed )
This filter is located in GFPayPal::can_process_ipn() in class-gf-paypal.php.
More Info
For more information on the WordPress add_filter function, refer to the WordPress Code Reference.