pmpro_paypal_level_description

The Paid Memberships Pro pmpro paypal level description hook.

Description

apply_filters( 'pmpro_paypal_level_description', (string) $substr, (string) $order_membership_level_name, (unknown) $order, (string) $get_bloginfo ); 

Parameters (4)

0. $substr (string) => substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127)
The substr.
1. $order_membership_level_name (string)
The order membership level name.
2. $order (unknown)
The order.
3. $get_bloginfo (string) => get_bloginfo("name")
The get bloginfo.

Usage

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

Defined (6)

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

/classes/gateways/class.pmprogateway_paypalexpress.php  
  1. $nvpStr .= "&DESC=" . urlencode( apply_filters( 'pmpro_paypal_level_description', substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127), $order->membership_level->name, $order, get_bloginfo("name")) ); 
  1. $nvpStr .= "&DESC=" . urlencode( apply_filters( 'pmpro_paypal_level_description', substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127), $order->membership_level->name, $order, get_bloginfo("name")) ); 
  1. $nvpStr .= "&DESC=" . urlencode( apply_filters( 'pmpro_paypal_level_description', substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127), $order->membership_level->name, $order, get_bloginfo("name")) ); 
/classes/gateways/class.pmprogateway_paypal.php  
  1. $nvpStr .= "&DESC=" . urlencode( apply_filters( 'pmpro_paypal_level_description', substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127), $order->membership_level->name, $order, get_bloginfo("name")) ); 
/classes/gateways/class.pmprogateway_payflowpro.php  
  1. $nvpStr .= "&PROFILENAME=" . urlencode( apply_filters( 'pmpro_paypal_level_description', substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127), $order->membership_level->name, $order, get_bloginfo("name")) ); 
  1. $nvpStr .= "&PROFILENAME=" . urlencode( apply_filters( 'pmpro_paypal_level_description', substr($order->membership_level->name . " at " . get_bloginfo("name"), 0, 127), $order->membership_level->name, $order, get_bloginfo("name")) );