Skip to content
Docs
Get RestroPress

Filter

rpress_get_checkout_uri

Updated
On this page

Filters the URL of the checkout page.

Runs at the end of rpress_get_checkout_uri(), after extra query arguments, HTTPS enforcement and optional cache busting (no_cache_checkout setting) have been applied to the permalink of the purchase page.

Parameters#

ParameterTypeDescription
$uristring|nullCheckout page URL.

Return value#

string|null. The checkout URL.

Example#

function my_checkout_uri( $uri ) {
	return $uri ? add_query_arg( 'ref', 'menu', $uri ) : $uri;
}
add_filter( 'rpress_get_checkout_uri', 'my_checkout_uri', 10, 1 );

Notes#

Used widely, including AJAX responses, so keep the callback light and return null/empty only if the input was.

Source#

Applied in:

  • includes/checkout/functions.php (line 146), in rpress_get_checkout_uri()

See also#

Was this page helpful?