WooCommerce Code Reference

WC_Payment_Gateways

Payment gateways class.

Table of Contents

$payment_gateways  : array
Payment gateway classes.
$_instance  : WC_Payment_Gateways
The single instance of the class.
__clone()  : mixed
Cloning is forbidden.
__construct()  : mixed
Initialize payment gateways.
__wakeup()  : mixed
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()  : mixed
Load gateways and hook in functions.
instance()  : WC_Payment_Gateways
Main WC_Payment_Gateways Instance.
payment_gateways()  : array
Get gateways.
process_admin_options()  : mixed
Save options in admin.
set_current_gateway()  : mixed
Set the current, active gateway.
filter_valid_gateway_class()  : bool
Callback for array filter. Returns true if gateway is of correct type.

Properties

Methods

get_payment_gateway_ids()

Get array of registered gateway ids

public get_payment_gateway_ids() : array
Tags
since
2.6.0
Return values
arrayof strings

set_current_gateway()

Set the current, active gateway.

public set_current_gateway(array $gateways) : mixed
Parameters
$gateways : array

Available payment gateways.

Return values
mixed

filter_valid_gateway_class()

Callback for array filter. Returns true if gateway is of correct type.

protected filter_valid_gateway_class(object $gateway) : bool
Parameters
$gateway : object

Gateway to check.

Tags
since
3.6.0
Return values
bool