# give/4.15.2/src/Onboarding/Helpers/LocationList.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.15.2. 28 lines.

- Page: https://pluginprobe.com/plugins/give/4.15.2/code/src/Onboarding/Helpers/LocationList.php
- Raw: https://pluginprobe.com/plugins/give/4.15.2/raw/src/Onboarding/Helpers/LocationList.php
- Modified: 2021-11-23T23:55:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.15.2/code/src/Onboarding/Helpers/LocationList.php#L10-L20`.

```php
<?php

namespace Give\Onboarding\Helpers;

/**
 * Normalize format of location type lists.
 * @since 2.8.0
 */
class LocationList
{

    public static function getCountries()
    {
        $countries = give_get_country_list();
        unset($countries['']);

        return FormatList::fromKeyValue($countries);
    }

    public static function getStates($country)
    {
        $states = give_get_states($country);
        $states[''] = sprintf('%s...', esc_html__('Select', 'give'));

        return FormatList::fromKeyValue($states);
    }
}

```
