Last active
November 24, 2022 13:07
-
-
Save timersys/2bf1c94c2d5328ceac4af30ec063c910 to your computer and use it in GitHub Desktop.
Change dropdown widget country names
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('geot/dropdown_widget/countries', function($countries) { | |
foreach( $countries as $i => $c ) { | |
if( $c->iso_code == 'US' ) { | |
$countries[$i]->country = 'USA'; | |
} | |
if( $c->iso_code == 'GB' ) { | |
$countries[$i]->country = 'UK'; | |
} | |
} | |
return $countries; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment