pmpro_stripe_order_description

The Paid Memberships Pro pmpro stripe order description hook.

Description

apply_filters( 'pmpro_stripe_order_description', (string) $order_order_code_trim_order_firstname_order_lastname_order_email, (unknown) $order ); 

Parameters (2)

0. $order_order_code_trim_order_firstname_order_lastname_order_email (string) => "Order #" . $order->code . ", " . trim($order->FirstName . " " . $order->LastName) . " (" . $order->Email . ")"
The order order code trim order firstname order lastname order email.
1. $order (unknown)
The order.

Usage

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

Defined (1)

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

/classes/gateways/class.pmprogateway_stripe.php  
  1. "description" => apply_filters('pmpro_stripe_order_description', "Order #" . $order->code . ", " . trim($order->FirstName . " " . $order->LastName) . " (" . $order->Email . ")", $order)