Filter
rpress_send_back_to_checkout
On this page
Filters the URL used to send a customer back to the checkout.
Runs in rpress_send_back_to_checkout() just before wp_safe_redirect(), for example after a validation error. The URL is the checkout URL with the supplied arguments appended.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$redirect | string | Redirect URL. |
$args | array | Query arguments added to the URL (strings are parsed into an array). |
Return value#
string. The URL to redirect to.
Example#
function my_send_back_to_checkout( $redirect, $args ) {
return add_query_arg( 'retry', '1', $redirect );
}
add_filter( 'rpress_send_back_to_checkout', 'my_send_back_to_checkout', 10, 2 );
Notes#
wp_safe_redirect() only allows hosts permitted by the allowed_redirect_hosts filter.
Source#
Applied in:
includes/checkout/functions.php(line 167), inrpress_send_back_to_checkout()
See also#
Was this page helpful?
