title: Getting country name from country code in WooCommerce
body: <p>WooCommerce defines countries as follows (edited for brevity):</p>
  <pre><code>class WC_Countries {
      public $countries;
  
      public function __construct() {
          global $woocommerce, $states;
  
          $this-&gt;countries = apply_filters( 'woocommerce_countries', array(
              'AF' =&gt; __( 'Afghanistan', 'woocommerce' ),
              'AX' =&gt; __( '&amp;#197;land Islands', 'woocommerce' ),
              'AL' =&gt; __( 'Albania', 'woocommerce' ),
              'DZ' =&gt; __( 'Algeria', 'woocommerce' ),
              // […]
          ));
      }
  }
  </code></pre>
  <p>When an order is placed, the country code is written to the WordPress <code>wp_postmeta</code> table and can be extracted anywhere an order id can be accessed using the <code>get_post_meta()</code> function:</p>
  <pre><code>get_post_meta( $order-&gt;id, '_shipping_country', true ),
  </code></pre>
  <p>Since we are simply retrieving two characters from the database, the question is how to translate the shipping country code (e.g. <code>AF</code>) to the country name specified in the <code>WC_Countries</code> class?</p>