-
-
Save Pebblo/1c2c55536bc88788194eae743e516633 to your computer and use it in GitHub Desktop.
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. | |
add_filter('FHEE__EE_Form_Section_Proper___construct__options_array', 'tw_ee_sage_pay_form_filter', 10, 2); | |
function tw_ee_sage_pay_form_filter( $options_array, $form ) { | |
if( $form instanceof EE_Billing_Attendee_Info_Form | |
&& $form->payment_method() instanceof EE_Payment_Method | |
&& $form->payment_method()->type() === 'Sage_Pay_Server' | |
&& !empty( $options_array['subsections'] ) | |
) { | |
$options_array['subsections'] = array( | |
'country' => $options_array['subsections']['country'], | |
'state' => $options_array['subsections']['state'] | |
) + $options_array['subsections']; | |
} | |
return $options_array; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment