current_user_on_subscription

The Membership 2 current user on subscription function.

Description

current_user_on_subscription( $sub_id ); 

Parameters (1)

0. $sub_id
The sub id.

Usage

  1. if ( !function_exists( 'current_user_on_subscription' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'membership-2/app_old/membershipincludes/includes/functions.php'; 
  3.  
  4. // The sub id. 
  5. $sub_id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = current_user_on_subscription($sub_id); 
  9.  

Defined (1)

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

/app_old/membershipincludes/includes/functions.php  
  1. function current_user_on_subscription( $sub_id ) { 
  2.  
  3. $user = wp_get_current_user(); 
  4. $member = new M_Membership( $user->ID ); 
  5.  
  6. if(!empty($member)) { 
  7. return $member->on_sub( $sub_id ); 
  8. } else { 
  9. return false; 
  10.