Home / functions.php / Rename a country in WooCommerce
  • How to Rename a country in WooCommerce

    rename-a-country-in-woocommerce

    Adding this snippet to the functions.php of your wordpress theme will rename any country in WooCommerce countries list.

    ( click code to copy )

    wordpress snippet : PHP

    <>
    add_filter( 'woocommerce_countries', 'rename_ireland' );
    function rename_ireland( $countries ) {
       $countries['IE'] = 'Ireland';
       return $countries;
    }
    

    ( WordPress codex functions, hooks, in this snippet. )

    add_filter,