membership_assign_subscription

The Membership 2 membership assign subscription function.

Description

membership_assign_subscription( $user_id ); 

Parameters (1)

0. $user_id
The user id.

Usage

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

Defined (1)

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

/app_old/membershipincludes/includes/functions.php  
  1. function membership_assign_subscription($user_id) { 
  2.  
  3. global $M_options; 
  4.  
  5. if(!empty($M_options['freeusersubscription'])) { 
  6. $member = new M_Membership($user_id); 
  7. if($member) { 
  8. $member->create_subscription($M_options['freeusersubscription']); 
  9.