get_membership_gateways

The Membership 2 get membership gateways function.

Description

get_membership_gateways(); 

Usage

  1. if ( !function_exists( 'get_membership_gateways' ) ) { 
  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 = get_membership_gateways(); 
  7.  

Defined (1)

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

/app_old/membershipincludes/includes/functions.php  
  1. function get_membership_gateways() { 
  2. if ( is_dir( membership_dir('membershipincludes/gateways') ) ) { 
  3. if ( $dh = opendir( membership_dir('membershipincludes/gateways') ) ) { 
  4. $mem_gateways = array(); 
  5. while ( ( $gateway = readdir( $dh ) ) !== false ) 
  6. if ( substr( $gateway, -4 ) == '.php' ) 
  7. $mem_gateways[] = $gateway; 
  8. closedir( $dh ); 
  9. sort( $mem_gateways ); 
  10.  
  11. return apply_filters('membership_available_gateways', $mem_gateways); 
  12.  
  13. return false; 
  14.