Support

Home Forums Event Espresso Premium A new State named "Nairobi (NBR)" was dynamically added from an Event Espresso

A new State named "Nairobi (NBR)" was dynamically added from an Event Espresso

Posted: May 17, 2018 at 5:54 am

Viewing 1 reply thread


Joseph Guarino

May 17, 2018 at 5:54 am

Hi, I got the following notice in my EE 4:

A new State named “Nairobi (NBR)” was dynamically added from an Event Espresso form for the Country of “Kenya”.
To verify, edit, and/or delete this new State, please go to the Event Espresso – General Settings > Countries Tab and update the States / Provinces section.
Check “Yes” to have this new State added to dropdown select lists in forms

Is this simply because a users specified this when they checked out?

Is there any way to block this feature?

Thanks,
Joe


Josh

  • Support Staff

May 17, 2018 at 8:49 am

Hi Joe,

Yes that message about the new state is because a user couldn’t find their state, so they used the option to add one.

You can remove the option to add a new state by adding the following code to your site:

add_action( 'template_redirect', 'my_remove_new_state_link' );
function my_remove_new_state_link() {
  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 ‘A new State named "Nairobi (NBR)" was dynamically added from an Event Espresso’ 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