pmpro_format_price

The Paid Memberships Pro pmpro format price hook.

Description

apply_filters( 'pmpro_format_price', (string) $formatted, (unknown) $price, (unknown) $pmpro_currency, (unknown) $pmpro_currency_symbol ); 

Parameters (4)

0. $formatted (string)
The formatted.
1. $price (unknown)
The price.
2. $pmpro_currency (unknown)
The pmpro currency.
3. $pmpro_currency_symbol (unknown)
The pmpro currency symbol.

Usage

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

Defined (1)

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

/includes/functions.php  
  1. return apply_filters('pmpro_format_price', $formatted, $price, $pmpro_currency, $pmpro_currency_symbol);