Skip to content
Docs
Get RestroPress

Action

rpress_purchase_form_no_access

Updated
On this page

Fires when the visitor is not allowed to check out.

Runs in rpress_show_purchase_form() when rpress_can_checkout() returns false. Core adds nothing here by default, so use it to explain why checkout is unavailable.

Example#

function my_purchase_form_no_access() {
	echo '<p class="my-no-access">' . esc_html__( 'Checkout is currently unavailable.', 'my-textdomain' ) . '</p>';
}
add_action( 'rpress_purchase_form_no_access', 'my_purchase_form_no_access', 10, 0 );

Source#

Fired from:

  • includes/checkout/template.php (line 132), in rpress_show_purchase_form()

See also#

Was this page helpful?