Filter
rpress_straight_to_gateway_purchase_data
On this page
Filters the purchase data built for a straight-to-gateway purchase.
Runs at the end of rpress_build_straight_to_gateway_data. The array describes a single menu item order sent directly to PayPal, with keys such as fooditems, fees, subtotal, price, purchase_key, user_email, user_info, cart_details, gateway (set to paypal) and buy_now (set to true). It is sent to the gateway by rpress_process_straight_to_gateway.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$purchase_data | array | Purchase data for the straight-to-gateway order. |
Return value#
array. The purchase data.
Example#
function my_straight_to_gateway_data( $purchase_data ) {
$purchase_data['post_data']['my_source'] = 'buy-now-button';
return $purchase_data;
}
add_filter( 'rpress_straight_to_gateway_purchase_data', 'my_straight_to_gateway_data', 10, 1 );
Source#
Applied in:
includes/gateways/functions.php(line 276), inrpress_build_straight_to_gateway_data()
See also#
rpress_build_straight_to_gateway_data()rpress_straight_to_gateway
Was this page helpful?
