pmpro_formatted_address

The Paid Memberships Pro pmpro formatted address hook.

Description

apply_filters( 'pmpro_formatted_address', (unknown) $address, (string) $name, (unknown) $address1, (unknown) $address2, (unknown) $city, (unknown) $state, (unknown) $zip, (number) $country, (unknown) $phone, (unknown) $nl2br ); 

Parameters (10)

0. $address (unknown)
The address.
1. $name (string)
The name.
2. $address1 (unknown)
The address1.
3. $address2 (unknown)
The address2.
4. $city (unknown)
The city.
5. $state (unknown)
The state.
6. $zip (unknown)
The zip.
7. $country (number)
The country.
8. $phone (unknown)
The phone.
9. $nl2br (unknown)
The nl2br.

Usage

To run the hook, copy the example below.
  1. $address = apply_filters( 'pmpro_formatted_address', $address, $name, $address1, $address2, $city, $state, $zip, $country, $phone, $nl2br ); 
  2.  
  3. if ( !empty( $address ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the pmpro_formatted_address callback 
  2. function filter_pmpro_formatted_address( $address, $name, $address1, $address2, $city, $state, $zip, $country, $phone, $nl2br ) { 
  3. // make filter magic happen here... 
  4. return $address
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'pmpro_formatted_address', 'filter_pmpro_formatted_address', 10, 10 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'pmpro_formatted_address', 'filter_pmpro_formatted_address', 10, 10 ); 

Defined (1)

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

/includes/functions.php  
  1. return apply_filters('pmpro_formatted_address', $address, $name, $address1, $address2, $city, $state, $zip, $country, $phone, $nl2br );