Support

Home Forums Event Espresso Premium Remove "click here to add a new state/province"

Remove "click here to add a new state/province"

Posted: January 8, 2018 at 6:58 pm

Viewing 5 reply threads


kdaily

January 8, 2018 at 6:58 pm

How can I remove the link to add a new state/province on the registration page?


Tony

  • Support Staff

January 9, 2018 at 4:27 am

Hi there,

You can use this snippet:

https://gist.github.com/joshfeck/7bf112ee2dc9e49f7e3f14b8c2b59611

Add that to a Custom Functions Plugin on your site and it will remove the link for you.


kdaily

January 10, 2018 at 10:40 am

I’m getting the error: Fatal error: Uncaught TypeError: Argument 1 passed to EE_Checkout::reg_step_sorting_callback() must be an instance of EE_SPCO_Reg_Step, instance of __PHP_Incomplete_Class given in /nas/content/live/bermanassoc/wp-content/plugins/event-espresso-core-reg/modules/single_page_checkout/inc/EE_Checkout.class.php:568 Stack trace: #0 [internal function]: EE_Checkout->reg_step_sorting_callback(Object(__PHP_Incomplete_Class), Object(EE_SPCO_Reg_Step_Attendee_Information)) #1 /nas/content/live/bermanassoc/wp-content/plugins/event-espresso-core-reg/modules/single_page_checkout/inc/EE_Checkout.class.php(527): uasort(Array, Array) #2 /nas/content/live/bermanassoc/wp-content/plugins/event-espresso-core-reg/modules/single_page_checkout/EED_Single_Page_Checkout.module.php(779): EE_Checkout->sort_reg_steps() #3 /nas/content/live/bermanassoc/wp-content/plugins/event-espresso-core-reg/modules/single_page_checkout/EED_Single_Page_Checkout.module.php(495): EED_Single_Page_Checkout->_load_and_instantiate_reg_steps() #4 /nas/content/live/bermana in /nas/content/live/bermanassoc/wp-content/plugins/event-espresso-core-reg/modules/single_page_checkout/inc/EE_Checkout.class.php on line 568


kdaily

January 10, 2018 at 11:02 am

Actually, I just removed the line with jQuery in the page editor. But I don’t know why the php function didn’t work.


Josh

  • Support Staff

January 10, 2018 at 12:25 pm

Hi there,

Your last two replies are puzzling. Can you explain a bit more about what you mean by “removed the line with jQuery in the page editor”? Also, the PHP function that Tony shared with you should work if added to the site correctly. May I ask how was the code added?


kdaily

January 14, 2018 at 9:20 pm

I used jQuery to set display:none on the div that displays the “click here to add a new state/province.” But I also found a type on the header of my plugin file that prevented the plugin from working, so the PHP function does work, and I use that now. Thanks.

Viewing 5 reply threads

The support post ‘Remove "click here to add a new state/province"’ 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