Skip to content
Docs
Get RestroPress

Action

rpress_purchase_form_login_fields

Updated
On this page

Fires when the checkout login fields are rendered.

Fires inside the checkout_login AJAX handler, which loads the login form fragment for the checkout, and also from rpress_recovery_force_login_fields when the login form is forced during cart recovery. Output echoed by callbacks becomes part of the returned HTML. The handler ends the request after the action, so nothing runs after it.

Example#

function my_login_fields() {
	echo '<p class="my-login-note">' . esc_html__( 'Log in to use your saved addresses.', 'my-plugin' ) . '</p>';
}
add_action( 'rpress_purchase_form_login_fields', 'my_login_fields', 10, 0 );

Notes#

Fired from the checkout_login AJAX handler and from rpress_recovery_force_login_fields; neither passes arguments.

Source#

Fired from:

  • includes/class-rpress-ajax.php (line 1486), in RP_AJAX::checkout_login()
  • includes/payments/actions.php (line 531), in rpress_recovery_force_login_fields()

See also#

Was this page helpful?