rcp_edit_subscription_form

Note: This is part of the developer docs and is considered custom code.
Unfortunately, we cannot provide support for custom code at this time as we do not have the additional resources that would be necessary to provide support for custom code.

If you need assistance with this, please reach out to our list of consultants for further assistance:
https://codeable.io/developers/restrict-content-pro/

Used to inject content into the "Edit Membership Level" table. This can be used to add a new field to the "Edit Membership Level Level" form.

For saving the custom value, you'll want to use the  rcp_edit_subscription_level action.
Example:
function rcpga_edit_groups_checkbox_subscription_form() {
	$seat_count = ( empty( $level->id ) ) ? 0 : rcpga_get_level_group_seats_allowed( $level->id ); ?>
	<tr class="form-field">
		<th scope="row" valign="top">
			<label for="rcpga-group-seats"><?php _e( 'Group Seats', 'rcp-group-accounts' ); ?></label>
		</th>
		<td>
			<input id="rcpga-group-seats" type="number" name="rcpga-group-seats" value="<?php echo absint( $seat_count ); ?>" min="0" style="width: 100px;"/>
			<p class="description"><?php _e( 'The number of group seats available to this level including the group owner.', 'rcp-group-accounts' ); ?></p>
		</td>
	</tr>
	<?php
}
add_action( 'rcp_edit_subscription_form', 'rcpga_edit_groups_checkbox_subscription_form' );
Have more questions? Submit a request
Powered by Zendesk