Skip to content
Docs
Get RestroPress

Filter

rpress_paypal_refund_request_args

Updated
On this page

Filters the wp_remote_post arguments used for the PayPal refund request.

Runs just before rpress_refund_paypal_purchase posts to the PayPal endpoint. The array contains body, headers and httpversion. Use it to set options such as the request timeout.

Parameters#

ParameterTypeDescription
$argsarrayArguments for wp_remote_post: body, headers and httpversion.
$paymentRPRESS_PaymentThe payment being refunded.

Return value#

array. The arguments passed to wp_remote_post.

Example#

function my_paypal_refund_request( $args, $payment ) {
	$args['timeout'] = 30;
	return $args;
}
add_filter( 'rpress_paypal_refund_request_args', 'my_paypal_refund_request', 10, 2 );

Source#

Applied in:

  • includes/gateways/paypal-standard.php (line 2196), in rpress_refund_paypal_purchase()

See also#

Was this page helpful?