Where is the list of countries and states located in wordpress?
When you select United States on a checkout form the “state” field immediately changes to contain the list of states. I would like to imitate this behavior for other countries. For example when selecting Honduras, you will get the list of states of that country.
Is there an XML file, php file or Database table where WordPress access this information? that way it could be editable to be able to add the states without having to add a plugin or write extra code.
I know you can access the list from the code with WC()->countries->get_states
how ever where is it obtaining it from?
There is a folder called
i18n
and in that folder there is another folder calledstates
, which contains a list of files. Add your file there asHN.php
with a list of the states you want shown e.g.: