Skip to content
Docs
Get RestroPress

Filter

rpress_get_success_page_uri

Updated
On this page

Filters the URL of the success (order confirmation) page.

Runs at the end of rpress_get_success_page_uri(). The URL is the permalink of the page chosen in the success_page option with any query string appended.

Parameters#

ParameterTypeDescription
$success_pagestring|falseSuccess page URL.

Return value#

string|false. The success page URL.

Example#

function my_success_page_uri( $success_page ) {
	return $success_page ? add_query_arg( 'source', 'checkout', $success_page ) : $success_page;
}
add_filter( 'rpress_get_success_page_uri', 'my_success_page_uri', 10, 1 );

Notes#

get_permalink() returns false when no success page is set.

Source#

Applied in:

  • includes/checkout/functions.php (line 73), in rpress_get_success_page_uri()

See also#

Was this page helpful?