Skip to content
Docs
Get RestroPress

Filter

rpress_paypal_refund_header_args

Updated
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#

ParameterTypeDescription
$headersarrayHeader names mapped to values.
$paymentRPRESS_PaymentThe 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), in rpress_refund_paypal_purchase()

See also#

Was this page helpful?