Last active
June 26, 2017 11:34
-
-
Save Pebblo/be08247a5599f30c9b26e2e1c4d09f0a to your computer and use it in GitHub Desktop.
Change the 'Attendee 1' text to 'Purchaser/Attendee 1'. This will only change the text on the checkout page and only applies to the first registration (where 'Attendee 1' is used for the legend)
This file contains 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 //Please do not include the opening PHP tag if you already have one | |
function tw_ee_form_section_proper( $options_array, $form_object ){ | |
if( isset($options_array['html_class']) && $options_array['html_class'] === 'ee-reg-form-attendee-dv' ) { | |
if( isset($options_array['layout_strategy']) && $options_array['layout_strategy'] instanceof EE_Fieldset_Section_Layout ) { | |
$layout_strategy = $options_array['layout_strategy']; | |
if( $layout_strategy->legend_text() === 'Attendee 1') { | |
$layout_strategy->set_legend_text( 'Purchaser/Attendee 1' ); | |
} | |
} | |
} | |
return $options_array; | |
} | |
add_filter('FHEE__EE_Form_Section_Proper___construct__options_array', 'tw_ee_form_section_proper', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment