Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Paid Memberships Pro Register Helper: Add t-shirt sizes as selection
Plugin Name: PMPro Customizations
Plugin URI:
Description: Customizations for my Paid Memberships Pro Setup
Version: .1
Author: Paid Memberships Pro
Author URI:
//Now start placing your customization code below this line
* This adds fields to your Paid Memberships Pro checkout and profile page.
* Add this code to your PMPro Customizations Plugin -
function my_pmprorh_init()
//don't break if Register Helper is not loaded
if(!function_exists( 'pmprorh_add_registration_field' )) {
return false;
$fields = array();
$fields[] = new PMProRH_Field(
'label' => 'T Shirt Size',
'options' => array(
'' => '- Select -',
'small' => 'Small',
'medium'=> 'Medium',
'large'=> 'Large',
'xlarge'=> 'X-Large',
'required' => true,
'profile' => true,
// 'memberslistcsv' => true, /* Uncomment to include in Memberlist CSV */
// "addmember" => true, /* Uncomment if using the Admin Add Member plugin */
//add the fields into a new checkout_boxes are of the checkout page
foreach($fields as $field)
'checkout_boxes', // location on checkout page
$field // PMProRH_Field object
//that's it. see the PMPro Register Helper readme for more information and examples.
add_action( 'init', 'my_pmprorh_init' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.