The gform_ppcp_entry_not_found_status_code filter in the Gravity Forms PayPal Checkout Add-On allows the status code for the entry not found WP_Error to be overridden.
Usage
add_filter('gform_ppcp_entry_not_found_status_code', 'your_function_name', 10, 3);
Parameters
- $status_code (int): The status code. Default is 200.
- $action (array): An associative array containing the event details.
array( 'type' => '', 'amount' => '', 'transaction_type'=> '', 'transaction_id' => '', 'subscription_id' => '', 'entry_id' => '', 'payment_status' => '', 'note' => '', );
- $event (array): The PayPal event object for the webhook which was received. See the PayPal API Reference for details about the event properties.
More information
See Gravity Forms Docs: gform_ppcp_entry_not_found_status_code
Examples
Change status code to 205
This example changes the status code to 205.
add_filter('gform_ppcp_entry_not_found_status_code', 'change_status_code', 10, 3); function change_status_code($status_code, $action, $event) { return '205'; }
Note: This code should be placed in the functions.php file of your active theme.