• 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)
  • Danny Santoro

    (@danielsantoro)

    Automattic Happiness Engineer

    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

    and

    woocommerce/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 8 years, 5 months ago by Danny Santoro. Reason: Additional thought
    Thread Starter Yoga Sukma

    (@yogasukma)

    Hi Danny, yes i solved by copying paste the array in i18n based on country for my store. it’s solved now.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Getting States name based on states code’ is closed to new replies.