Support

Home Forums Event Espresso Premium Dynamically adding states to countries

Dynamically adding states to countries

Posted: October 24, 2016 at 5:27 am

Viewing 1 reply thread


wmnf

October 24, 2016 at 5:27 am

We’ve been getting notices about bogus states being added to countries, is there a way to disable this on the registration? To only show the states we have setup and no more options? I don’t see a setting to turn this off.


Josh

  • Support Staff

October 24, 2016 at 10:44 am

You can disable the add new state for by adding the following code to your website:

add_action( 'init', 'my_remove_add_new_state_form' );
function my_remove_add_new_state_form() {
  remove_filter( 'FHEE__EE_SPCO_Reg_Step_Attendee_Information___question_group_reg_form__question_group_reg_form', array( 'EED_Add_New_State', 'display_add_new_state_micro_form' ), 1 ); 
  remove_filter( 'FHEE__EE_SPCO_Reg_Step_Payment_Options___get_billing_form_for_payment_method__billing_form', array( 'EED_Add_New_State', 'display_add_new_state_micro_form' ), 1 );
}

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.

Viewing 1 reply thread

The support post ‘Dynamically adding states to countries’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso