Filter
rpress_success_page_redirect
On this page
Filters the URL customers are redirected to after a successful order.
Runs in rpress_send_to_success_page() just before wp_safe_redirect(). The URL is the success page with a payment_key query string unless a query string was supplied.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$redirect | string | Redirect URL. |
$gateway | string | Gateway ID from the rpress-gateway request value, or an empty string. |
$query_string | string|null | Query string appended to the success page. |
Return value#
string. The URL to redirect to.
Example#
function my_success_page_redirect( $redirect, $gateway, $query_string ) {
return add_query_arg( 'gateway', $gateway, $redirect );
}
add_filter( 'rpress_success_page_redirect', 'my_success_page_redirect', 10, 3 );
Notes#
wp_safe_redirect() only allows hosts permitted by the allowed_redirect_hosts filter.
Source#
Applied in:
includes/checkout/functions.php(line 119), inrpress_send_to_success_page()
See also#
Was this page helpful?
