Filter
rpress_paypal_web_accept_and_cart_data
On this page
Filters the PayPal web accept and cart IPN data before the order is updated.
Runs at the start of rpress_process_paypal_web_accept_and_cart. The array holds the IPN fields such as txn_type, payment_status, txn_id, mc_gross and custom. The processing function returns early unless txn_type is web_accept or cart, or payment_status is Refunded.
Available since RestroPress 1.0.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$data | array | IPN data from PayPal. |
$payment_id | int | ID of the order associated with the IPN request. |
Return value#
array. The IPN data.
Example#
function my_paypal_web_accept_data( $data, $payment_id ) {
if ( isset( $data['payment_status'] ) ) {
$data['payment_status'] = sanitize_text_field( $data['payment_status'] );
}
return $data;
}
add_filter( 'rpress_paypal_web_accept_and_cart_data', 'my_paypal_web_accept_data', 10, 2 );
Source#
Applied in:
includes/gateways/paypal-standard.php(line 1639), inrpress_process_paypal_web_accept_and_cart()
See also#
Was this page helpful?
