Getting States name based on states code (original) (raw)
- I think it must be simple, but i can’t get any reference to get states name based on states code.
I just want to show states name for custom reporting plugin, but can’t found how to get states name.
Viewing 2 replies - 1 through 2 (of 2 total)
- Hi Yoga,
There aren’t any functions to pull to get a state’s name – the only references to the full state names are in the following files:woocommerce/i18n/languages/woocommerce.pot
andwoocommerce/i18n/states/us.php
In the second file all of the states are added as an array, so you may be able to pull something through a localization file. It almost seems like it’d be easier to convert the state’s two-letter prefix to the full name once it reaches your error reporting plugin.- This reply was modified 9 years, 4 months ago by
Danny Santoro. Reason: Additional thought
Hi Danny, yes i solved by copying paste the array in i18n based on country for my store. it’s solved now.
Thanks
- This reply was modified 9 years, 4 months ago by
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Getting States name based on states code’ is closed to new replies.
2 replies
2 participants
Last reply from: Yoga Sukma
Last activity: 9 years, 4 months ago
Status: not resolved