Support

Home Forums Event Espresso Premium How to remove "click here to add a new state/province" in EE4

How to remove "click here to add a new state/province" in EE4

Posted: July 18, 2017 at 9:08 pm

Viewing 1 reply thread


CentreSupport

July 18, 2017 at 9:08 pm

Hello Support
Have been trying to follow instructions to remove How to remove “click here to add a new state/province” from registration form …as per this post https://eventespresso.com/topic/remove-stateprovince-from-registration-form/
but this doesn’t appear to be and option any more our version Event Espresso 4.9.43.p
—-
WordPress Version: 4.8
PHP Version: 5.6.27
MySQL Version: 5.6.34
Event Espresso Version: 4.9.43.p
—–


Josh

  • Support Staff

July 18, 2017 at 11:50 pm

Hi CentreSupport,

The other topic you’re trying to follow was about removing the state/province field. You’re actually looking to remove the “click here to add a new state/province” link. Here’s how you remove it:

You add the following code to a functions plugin:

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 ‘How to remove "click here to add a new state/province" in EE4’ 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