woocommerce_my_account_my_address_formatted_address

The WooCommerce woocommerce my account address formatted hook.

Description

apply_filters( 'woocommerce_my_account_my_address_formatted_address', (callback) $array, (unknown) $customer_id, (string) $name ); 

Parameters (3)

0. $array — Optional. (callback) => array( 'first_name' => get_user_meta( $customer_id, $name . '_first_name', true ), 'last_name' => get_user_meta( $customer_id, $name . '_last_name', true ), 'company' => get_user_meta( $customer_id, $name . '_company', true ), 'address_1' => get_user_meta( $customer_id, $name . '_address_1', true ), 'address_2' => get_user_meta( $customer_id, $name . '_address_2', true ), 'city' => get_user_meta( $customer_id, $name . '_city', true ), 'state' => get_user_meta( $customer_id, $name . '_state', true ), 'postcode' => get_user_meta( $customer_id, $name . '_postcode', true ), 'country' => get_user_meta( $customer_id, $name . '_country', true ), )
The array.
1. $customer_id (unknown)
The customer id.
2. $name (string)
The name.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'woocommerce_my_account_my_address_formatted_address', $array, $customer_id, $name ); 
  2.  
  3. if ( !empty( $array ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_my_account_my_address_formatted_address callback 
  2. function filter_woocommerce_my_account_my_address_formatted_address( $array, $customer_id, $name ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_my_account_my_address_formatted_address', 'filter_woocommerce_my_account_my_address_formatted_address', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_my_account_my_address_formatted_address', 'filter_woocommerce_my_account_my_address_formatted_address', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/templates/myaccount/my-address.php  
  1. $address = apply_filters( 'woocommerce_my_account_my_address_formatted_address', array(