pmpro_confirmation_message

All devs to filter the confirmation message.

Description

apply_filters( 'pmpro_confirmation_message', (string) $confirmation_message, (object) $pmpro_invoice ); 

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

Parameters (2)

0. $confirmation_message (string)
The confirmation message.
1. $pmpro_invoice (object)
The PMPro Invoice/Order object.

Usage

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

Defined (2)

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

/pages/confirmation.php  
  1. $confirmation_message = apply_filters("pmpro_confirmation_message", $confirmation_message, $pmpro_invoice); 
  1. $confirmation_message = apply_filters("pmpro_confirmation_message", $confirmation_message, false);