Skip to content
Docs
Get RestroPress

Filter

rpress_is_failure_page

Updated
On this page

Filters whether the current request is the Failed Transaction page.

Runs inside rpress_is_failed_transaction_page(), which compares the current page against the Failed Transaction page set in the payment settings. The result is used by template logic that treats the page as the failure screen. Return true to have a custom page treated as the failure page.

Parameters#

ParameterTypeDescription
$retboolResult of is_page() for the configured failure page.

Return value#

bool. True if the current page should be treated as the Failed Transaction page.

Example#

function my_is_failure_page( $ret ) {
	return $ret || is_page( 'payment-failed' );
}
add_filter( 'rpress_is_failure_page', 'my_is_failure_page', 10, 1 );

Source#

Applied in:

  • includes/checkout/functions.php (line 193), in rpress_is_failed_transaction_page()

See also#

Was this page helpful?