The all_country_option_tags object

The all_country_option_tags object outputs an <option> tag for each country.

Each <option> tag has a data-provinces attribute that contains an array of the country's subregions. Each subregion item contains the following:

  • Name: The name of the subregion.
  • Label: The customer facing label for the subregion. Labels are translated to the currently selected language.

If a country doesn't have any subregions, then the array is empty.

The all_country_option_tags object should be wrapped in <select> tags: