M_register_gateway

The Membership 2 M register gateway function.

Description

M_register_gateway( $gateway, $class ); 

Parameters (2)

0. $gateway
The gateway.
1. $class
The class.

Usage

  1. if ( !function_exists( 'M_register_gateway' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'membership-2/app_old/membershipincludes/classes/class.gateway.php'; 
  3.  
  4. // The gateway. 
  5. $gateway = null; 
  6.  
  7. // The class. 
  8. $class = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = M_register_gateway($gateway, $class); 
  12.  

Defined (1)

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

/app_old/membershipincludes/classes/class.gateway.php  
  1. function M_register_gateway($gateway, $class) { 
  2.  
  3. global $M_Gateways; 
  4.  
  5. if(!is_array($M_Gateways)) { 
  6. $M_Gateways = array(); 
  7.  
  8. $M_Gateways[$gateway] = new $class; 
  9.