get_ms_account_membership_status

The Membership 2 get ms account membership status function.

Description

get_ms_account_membership_status(); 

Usage

  1. if ( !function_exists( 'get_ms_account_membership_status' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'membership-2/app/template/template-tags.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_ms_account_membership_status(); 
  7.  

Defined (1)

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

/app/template/template-tags.php  
  1. function get_ms_account_membership_status() { 
  2. if ( MS_Model_Relationship::STATUS_PENDING == MS_Helper_Template::$ms_account['subscription']->status ) { 
  3. // Display a "Purchase" link when status is Pending 
  4. $code = sprintf( 
  5. '[%s id="%s" label="%s"]',  
  6. MS_Helper_Shortcode::SCODE_MS_BUY,  
  7. MS_Helper_Template::$ms_account['membership']->id,  
  8. __( 'Pending', 'membership2' ) 
  9. ); 
  10. return do_shortcode( $code ); 
  11. } else { 
  12. return esc_html( MS_Helper_Template::$ms_account['subscription']->status_text() );