pmpro_level_description

All devs to filter the level description at checkout.

Description

apply_filters( 'pmpro_level_description', (string) $pmpro_level_description, (object) $pmpro_level ); 

We also have a function in includes/filters.php that applies the the_content filters to this description.

Parameters (2)

0. $pmpro_level_description (string)
The pmpro level description.
1. $pmpro_level (object)
The PMPro Level object.

Usage

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

Defined (1)

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

/pages/checkout.php  
  1. $level_description = apply_filters('pmpro_level_description', $pmpro_level->description, $pmpro_level);