• Resolved jordantsap

    (@jordantsap)


    The plugin is very good but there are some naming issues.
    Many of the names use (psevdo) in names that i want to remove. Why include (psevdo) anyway?
    Also many greek cities or areas dont show first letter of the name or they are named with english letters but greek spelling (greeklish), lastly the area dropdown, show first names as empty list names

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Condless

    (@condless)

    Hi,
    The empty options may be added by another code/plugin, please try to temporary replace your theme and deactivate all the plugins except WooCommerce and Cities Shipping Zones.

    The names of the cities can be modified using the following code into your theme’s functions.php file (for example this will remove the ‘psevdo’ from Patra and Elafonissos):

    add_filter( 'csz_cities', 'csz_modify_cities_names' );
    function csz_modify_cities_names( $cities ) {
    	if ( 0 == strpos( get_locale(), 'en' ) ) {
    		$country = 'GR';
    		$cities_names = [
    			'GR37010100'	=> __( 'West Greece', 'woocommerce' ) . ' - ' . 'Patra',
    			'GR43030000'	=> __( 'Peloponnese', 'woocommerce' ) . ' - ' . 'Elafonissos',
    		];
    		foreach ( $cities_names as $key => $city ) {
    			if ( isset( $cities[ $country ][ $key ] ) ) {
    				$cities[ $country ][ $key ] = $city;
    			}
    		}
    	}
    	return $cities;
    }

    GR37010100 is the code of Patra and GR43030000 is the code of Elafonissos (cities codes are accessible in the plugin folder /i18n/cities/GR.php file)

Viewing 1 replies (of 1 total)
  • The topic ‘[NSFW] Edit greek area names’ is closed to new replies.