Viewing 1 replies (of 1 total)
  • Plugin Support Sandip Mondal – a11n

    (@sandipmondal)

    Hi @krasniqi8,

    Thanks for highlighting this issue.

    A Github report was already opened to add the Republic of Kosovo as its own country: https://github.com/woocommerce/woocommerce/issues/35819

    In the meantime, and until they’re able to work on and implement your request, it is possible for you to add Kosovo as a country for your clients, by using this Add a new country to countries list code snippet.

    You can either add it to your child-theme’s functions.php file, or use one of these code snippet plugins from www.remarpro.com.

    
    /**
     * Add a new country to countries list
     */
    add_filter( 'woocommerce_countries',  'handsome_bearded_guy_add_my_country' );
    function handsome_bearded_guy_add_my_country( $countries ) {
      $new_countries = array(
    	                    'XK'  => __( 'Kosovo', 'woocommerce' ),
    	                    );
    
    	return array_merge( $countries, $new_countries );
    }
    
    add_filter( 'woocommerce_continents', 'handsome_bearded_guy_add_my_country_to_continents' );
    function handsome_bearded_guy_add_my_country_to_continents( $continents ) {
    	$continents['EU']['countries'][] = 'XK';
    	return $continents;
    }
    

    I’m not sure if ‘XK’ is the country abbreviation, feel free to edit the snippet as you like.

    I trust that points you in the right direction.

    If you have more questions, do let us know.`

Viewing 1 replies (of 1 total)
  • The topic ‘add state of Kosovo at the list of country/state’ is closed to new replies.