Skip to content
Docs
Get RestroPress

Action

rpress_purchase_form_user_info

Updated
On this page

Fires at the end of the checkout contact fields and the registration fields.

Runs after the standard fields are output, both in the contact section built by rpress_user_info_fields() and in the registration block built by rpress_get_register_fields(). Use it to add fields that should be collected with the customer details.

Example#

function my_user_info_field() {
	echo '<p class="rp-col-sm-12"><label for="my-company">' . esc_html__( 'Company', 'my-textdomain' ) . '</label>';
	echo '<input type="text" name="my_company" id="my-company" class="rpress-input" /></p>';
}
add_action( 'rpress_purchase_form_user_info', 'my_user_info_field', 10, 0 );

Notes#

Fired from two functions, so a callback can run twice on the same page when both the contact fields and the registration block are rendered.

Source#

Fired from:

  • includes/checkout/template.php (line 338), in rpress_user_info_fields()
  • includes/checkout/template.php (line 716), in rpress_get_register_fields()

See also#

Was this page helpful?