Skip to content
Docs
Get RestroPress

Filter

rpress_payment_recovery_url

Updated
On this page

Filters the URL a customer can use to recover an unpaid payment.

Applied in RPRESS_Payment::get_recovery_url, which returns false when the payment is not recoverable. The default URL points to the checkout page with the rpress_action=recover_payment, payment_id and payment_key query arguments.

Parameters#

ParameterTypeDescription
$recovery_urlstringThe recovery URL.
$paymentRPRESS_PaymentThe payment object.

Return value#

string. The recovery URL.

Example#

function my_recovery_url( $recovery_url, $payment ) {
	return add_query_arg( 'utm_source', 'recovery', $recovery_url );
}
add_filter( 'rpress_payment_recovery_url', 'my_recovery_url', 10, 2 );

Notes#

Removing payment_key from the URL breaks recovery, because the key is required to recover a payment.

Source#

Applied in:

  • includes/payments/class-rpress-payment.php (line 1634), in RPRESS_Payment::get_recovery_url()

See also#

Was this page helpful?