Filter
rpress_paypal_refund_header_args
On this page
Filters the HTTP headers sent with the PayPal refund request.
Runs in rpress_refund_paypal_purchase after the body is filtered. The default headers are Content-Type (application/x-www-form-urlencoded) and Cache-Control (no-cache). The result becomes the headers entry of the wp_remote_post arguments.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$headers | array | Header names mapped to values. |
$payment | RPRESS_Payment | The payment being refunded. |
Return value#
array. The headers to send.
Example#
function my_paypal_refund_headers( $headers, $payment ) {
$headers['User-Agent'] = 'MyStore/1.0';
return $headers;
}
add_filter( 'rpress_paypal_refund_header_args', 'my_paypal_refund_headers', 10, 2 );
Source#
Applied in:
includes/gateways/paypal-standard.php(line 2189), inrpress_refund_paypal_purchase()
See also#
Was this page helpful?
