remove some cities from the list

[ad_1]

How I remove some cities from the list? I found the solution code like this:

add_filter( 'csz_cities', 'csz_remove_cities' );
function csz_remove_cities( $cities ) {
         $country_code="EE"; 
         $unnecessary_cities = [ 'EE784', 'EE296', 'EE446' ]; 
         foreach ( $unnecessary_cities as $city ) { 
                  if ( isset( $cities[ $country_code ][ $city ] ) ) {
                      unset( $cities[ $country_code ][ $city ] ); 
                  } 
         } 
         return $cities;
 }

In this code, the country code ‘EE’ is for Estonia and ‘EE784’, ‘EE296’, ‘EE446’ are the cities code of Estonia. But I can’t test it because I don’t know how to check the country code.

I would know how can I find the country code for Myanmar and cities code?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer