Posted: August 16, 2018 at 12:44 pm
This is related to: https://eventespresso.com/topic/stateprovinces/ We’re once again trying to upload states/provinces to countries (not provided by EE) using the PHP files from the State/Province Packs link as a reference. For example, Venezuela: When we upload the pack, their states don’t append to the country. All the fields are empty. As a note, we’ve commented out “if ($installed) return;” as suggested in the previous thread. |
|
Hi John, May I ask where are you upload the files to? If you go to the WordPress > Plugins screen is there a listing for the state/provinces plugins? and if so did you click the “Activate” link for those items? |
|
It was uploaded to /wp-content/plugins directory, |
|
*We are on the latest version of EE |
|
*We are on the latest version of EE |
|
If you check the states for the Bahamas listing you’ll probably find the Venezuela states there. Here’s a corrected version of the code: You’ll note that the first parameter needs to match the Countrie’s ISO alpha 2 code, which Venezuela’s code is https://www.nationsonline.org/oneworld/country_code_list.htm |
|
Awesome, so it was indeed the ISO codes that were the issue. Once we’ve changed them to their actual ISO code, it worked. The new issue we have is that because we used ‘BS’ as the country ISO code for the all of the packs we’ve done, all of the states were collected in the Bahamas. Is there a way to remove all of the states? |
|
The safe way will be to go into the Event Espresso > General Settings > Countries tab and select Bahamas, and use the UI to delete the states. If you backup your database first, you could go into phpmyadmin and run this query in the terminal: Note that in the above example the table prefix is |
|
I’m having an issue with appending the Venezuela states to the Venezuela dropdown. I noticed the states continued to get added to the Bahamas dropdown even with the correct ISO code from your correction. Also in the Event Expresso countries tab I get an error when I try to open Bahamas.
Im going to delete the values via the database. |
|
You might check to see if the incorrect code is loading from elsewhere, like if there’s another plugin active with that same code. |
|
The support post ‘States-Provinces’ 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.