Skip to content

Instantly share code, notes, and snippets.

@kimcoleman
Created September 24, 2019 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimcoleman/812c977e5484b6b8be113cc6ebf8b6e1 to your computer and use it in GitHub Desktop.
Save kimcoleman/812c977e5484b6b8be113cc6ebf8b6e1 to your computer and use it in GitHub Desktop.
Register Helper Custom Fields for aatherapy.org
<?php
// Register Helper Custom Fields for PMPro
function aatherapy_pmprorh_init() {
//don't break if Register Helper is not loaded
if ( ! function_exists( 'pmprorh_add_registration_field' ) ) {
return false;
}
//define the fields
$fields = array();
$fields[] = new PMProRH_Field(
'licenses',
'text',
array(
'label' => 'Licenses/Certifications',
'size' => 40,
'profile' => true
)
);
$fields[] = new PMProRH_Field(
'pet_name',
'text',
array(
'label' => 'Therapy Pet Name',
'size' => 40,
'profile' => true
)
);
$fields[] = new PMProRH_Field(
'pet_breed',
'text',
array(
'label' => 'Therapy Pet Breed',
'size' => 40,
'profile' => true
)
);
pmprorh_add_checkout_box( 'member_information', 'Member Information' );
foreach ( $fields as $field ) {
pmprorh_add_registration_field(
'member_information',
$field
);
}
}
add_action( 'init', 'aatherapy_pmprorh_init' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment