M_ping_joinedsub

The Membership 2 M ping joinedsub function.

Description

M_ping_joinedsub( $tosub_id, $tolevel_id, $to_order, $user_id ); 

Parameters (4)

0. $tosub_id
The tosub id.
1. $tolevel_id
The tolevel id.
2. $to_order
The to order.
3. $user_id
The user id.

Usage

  1. if ( !function_exists( 'M_ping_joinedsub' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'membership-2/app_old/membershipincludes/classes/class.ping.php'; 
  3.  
  4. // The tosub id. 
  5. $tosub_id = null; 
  6.  
  7. // The tolevel id. 
  8. $tolevel_id = null; 
  9.  
  10. // The to order. 
  11. $to_order = null; 
  12.  
  13. // The user id. 
  14. $user_id = null; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = M_ping_joinedsub($tosub_id, $tolevel_id, $to_order, $user_id); 
  18.  

Defined (1)

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

/app_old/membershipincludes/classes/class.ping.php  
  1. function M_ping_joinedsub( $tosub_id, $tolevel_id, $to_order, $user_id ) { 
  2.  
  3. $sub = new M_Subscription( $tosub_id ); 
  4. $subjoiningping_id = $sub->get_meta( 'joining_ping' ); 
  5.  
  6. if(!empty($subjoiningping_id)) { 
  7. $ping = new M_Ping( $subjoiningping_id ); 
  8.  
  9. $ping->send_ping( $tosub_id, $tolevel_id, $user_id ); 
  10.  
  11. $level = new M_Level( $tolevel_id ); 
  12. $joiningping_id = $level->get_meta( 'joining_ping' ); 
  13.  
  14. if(!empty($joiningping_id)) { 
  15. $ping = new M_Ping( $joiningping_id ); 
  16.  
  17. $ping->send_ping( $tosub_id, $tolevel_id, $user_id ); 
  18.