PHP Class WC_Payment_Gateways

Loads payment gateways via hooks for use in the store.
Author: WooThemes
Exibir arquivo Open project: woocommerce/woocommerce Class Usage Examples

Public Properties

Property Type Description
$payment_gateways Array of payment gateway classes.

Protected Properties

Property Type Description
$_instance The single instance of the class

Public Methods

Method Description
__clone ( ) Cloning is forbidden.
__construct ( ) Initialize payment gateways.
__wakeup ( ) Unserializing instances of this class is forbidden.
get_available_payment_gateways ( ) : array Get available gateways.
get_payment_gateway_ids ( ) : array Get array of registered gateway ids
init ( ) Load gateways and hook in functions.
instance ( ) : WC_Payment_Gateways Main WC_Payment_Gateways Instance.
payment_gateways ( ) : array Get gateways.
process_admin_options ( ) Save options in admin.
set_current_gateway ( $gateways ) Set the current, active gateway.

Method Details

__clone() public method

Cloning is forbidden.
Since: 2.1
public __clone ( )

__construct() public method

Initialize payment gateways.
public __construct ( )

__wakeup() public method

Unserializing instances of this class is forbidden.
Since: 2.1
public __wakeup ( )

get_available_payment_gateways() public method

Get available gateways.

get_payment_gateway_ids() public method

Get array of registered gateway ids
Since: 2.6.0
public get_payment_gateway_ids ( ) : array
return array of strings

init() public method

Load gateways and hook in functions.
public init ( )

instance() public static method

Ensures only one instance of WC_Payment_Gateways is loaded or can be loaded.
Since: 2.1
public static instance ( ) : WC_Payment_Gateways
return WC_Payment_Gateways Main instance

payment_gateways() public method

Get gateways.
public payment_gateways ( ) : array
return array

process_admin_options() public method

Save options in admin.

set_current_gateway() public method

Set the current, active gateway.
public set_current_gateway ( $gateways )

Property Details

$_instance protected_oe static_oe property

The single instance of the class
Since: 2.1
protected static $_instance

$payment_gateways public_oe property

Array of payment gateway classes.
public $payment_gateways