Restrict Content Pro
rcp_before_register_form
Coming soon: Restrict Content Pro is becoming Kadence Memberships. You may see both names used while we update the product, documentation, and customer experience.
Note: This content is provided as a resource within our developer documentation. Because custom code requires highly specific implementation, we encourage you to work with a qualified developer if you need guidance. You can find our recommended consultants here: https://codeable.io/developers/restrict-content-pro
Fires in rcp_registration_form_fields() immediately before RCP loads the registration template (register.php, register-single.php, or a level-specific override).
Use it for markup or notices above the full registration form output from register_form / register_form_stripe shortcodes.
Parameters
$level_id (int|null) – Membership level ID when the form is scoped to one level (single-level shortcode); null when all levels are shown.
$atts (array) – Shortcode attributes passed into rcp_registration_form_fields().
Examples
function mytheme_rcp_before_register_form( $level_id, $atts ) {
if ( $level_id ) {
echo '<p>' . esc_html__( 'You are registering for a specific membership level.', 'mytheme' ) . '</p>';
}
}
add_action( 'rcp_before_register_form', 'mytheme_rcp_before_register_form', 10, 2 );
Related: rcp_after_register_form, rcp_before_register_form_fields.