Created
February 7, 2018 19:43
-
-
Save kimcoleman/732000e156ac4e82a3b0aba0d30ae904 to your computer and use it in GitHub Desktop.
Register Helper checkbox field for thread by igbc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_pmprorh_after_email_init_igbc() { | |
//don't break if Register Helper is not loaded | |
if( !function_exists( 'pmprorh_add_registration_field') ) { | |
return false; | |
} | |
//define the fields | |
$fields_after_email = array(); | |
$fields_after_email[] = new PMProRH_Field( | |
'igbc_mailings', | |
'checkbox', | |
array( | |
'label' => 'Check this box to receive IGBC communications by email', | |
'profile' => true, | |
'required' => false, | |
'memberslistcsv' => true, | |
) | |
); | |
//add the fields in the after_email area of the checkout page | |
foreach( $fields_after_email as $field ) { | |
pmprorh_add_registration_field("after_email", $field); | |
} | |
} | |
add_action( 'init', 'my_pmprorh_after_email_init_igbc' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment