current_user_has_subscription

The Membership 2 current user has subscription function.

Description

current_user_has_subscription(); 

Usage

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

Defined (1)

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

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