• Resolved nadworks

    (@nadworks)


    We’re frequently asked to change some of the country spellings. I.e. most of our users want the long version of US to be just USA (instead of “United States”). We also have a few regional preferences for country spellings that some users want reflected. We’re a little stuck as to how this can be done, even with the latest filters.

    We don’t want to remove or add those countries. Just change their long names. How can this be done without editing the core file, please?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @nadworks,

    Thanks for reaching out!

    Kindly try adding the following lines of code to the functions.php file of your theme, as this should change the full form of “US” to “USA” instead of “United States”,

    add_filter( 'gigpress_country_list', 'my_gigpress_country_list');
     
    function my_gigpress_country_list( array $gp_countries ) {
        $gp_countries = [
            'US' => 'USA'
        ];
        return (array) $gp_countries;
    }

    This snippet uses the country list filter described here,
    https://theeventscalendar.com/knowledgebase/k/modifying-the-country-list-in-gigpress/

    Let me know if this helps.

    Plugin Support Abz

    (@abzlevelup)

    Hey @nadworks, this thread has been inactive for a while, so we’re going to go ahead and mark it Resolved. Please feel free to open a new thread if any other questions come up, and we’d be happy to help.

    Cheers,
    Abz

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘change country spelling/name’ is closed to new replies.