title: Woocommerce - How to customize the addresses output?
body: <p>I am customizing the "view order" (order-details.php) page in Woocommerce, within "My Account" (when an user is logged in) and we have the code below to print the billing and shipping addresses:</p>
  
  <pre><code>&lt;?php if (!$order-&gt;get_formatted_billing_address()) _e( 'N/A', 'woocommerce' ); else echo $order-&gt;get_formatted_billing_address(); ?&gt;
  </code></pre>
  
  <p>I would like to know if there is a way to customize each item of that output. For example: in the homepage of My Account, which shows the customer's billing and shipping addresses in this way:</p>
  
  <pre><code>&lt;?php
      $address = apply_filters( 'woocommerce_my_account_my_address_formatted_address', array(
          'first_name'    =&gt; ucwords(get_user_meta( $customer_id, $name . '_first_name', true )),
          'last_name'     =&gt; ucwords(get_user_meta( $customer_id, $name . '_last_name', true )),
          'company'       =&gt; ucwords(get_user_meta( $customer_id, $name . '_company', true )),
          'address_1'     =&gt; ucwords(get_user_meta( $customer_id, $name . '_address_1', true )),
          'address_2'     =&gt; ucwords(get_user_meta( $customer_id, $name . '_address_2', true )),
          'city'          =&gt; get_user_meta( $customer_id, $name . '_city', true ),
          'state'         =&gt; get_user_meta( $customer_id, $name . '_state', true ),
          'postcode'      =&gt; get_user_meta( $customer_id, $name . '_postcode', true ),
          'country'       =&gt; get_user_meta( $customer_id, $name . '_country', true )
      ), $customer_id, $name );
  
      $formatted_address = $woocommerce-&gt;countries-&gt;get_formatted_address( $address );
  
      if ( ! $formatted_address )
          _e( 'You have not set up this type of address yet.', 'woocommerce' );
      else
          echo $formatted_address;
  ?&gt;
  </code></pre>
  
  <p>It's something like that I want to use in order view page. How could I put that "apply_filters" in this code?</p>