Skip to content
Docs
Get RestroPress

Filter

rpress_account_hub_order_receipt_url

Updated
On this page

Filters the receipt URL used for an order in the account hub.

Used for order tracking links in the account hub. The default is the receipt (success) page URL with the payment_key query argument, which shows the live order status. The filter does not run when the order has no payment key or no success page is set.

Parameters#

ParameterTypeDescription
$urlstringReceipt URL including the payment_key query argument.
$payment_idintPayment ID.

Return value#

string. Receipt URL.

Example#

add_filter( 'rpress_account_hub_order_receipt_url', 'my_receipt_url', 10, 2 );
function my_receipt_url( $url, $payment_id ) {
	return add_query_arg( 'utm_source', 'account', $url );
}

Source#

Applied in:

  • includes/features/account-hub/frontend.php (line 30), in rpress_account_hub_order_receipt_url()
Was this page helpful?