Skip to content
Docs
Get RestroPress

Filter

rpress_is_success_page

Updated
On this page

Filters whether the current request is the success page.

Runs at the end of rpress_is_success_page(). The check passes for the page selected in the success_page option or for a singular page containing the rpress_receipt shortcode or the rpress/receipt block.

Parameters#

ParameterTypeDescription
$is_success_pageboolTrue when the current page is the success page.

Return value#

bool. Whether it is the success page.

Example#

function my_is_success_page( $is_success_page ) {
	if ( ! $is_success_page && is_page( 'thank-you' ) ) {
		return true;
	}
	return $is_success_page;
}
add_filter( 'rpress_is_success_page', 'my_is_success_page', 10, 1 );

Source#

Applied in:

  • includes/checkout/functions.php (line 95), in rpress_is_success_page()

See also#

Was this page helpful?