WordPress at Your Fingertips
function is not described

WC_Payment_Gateways::instance() public WC 2.1

Main WC_Payment_Gateways Instance.

Ensures only one instance of WC_Payment_Gateways is loaded or can be loaded.

{} It's a method of the class: WC_Payment_Gateways{}

No Hooks.


WC_Payment_Gateways. Main instance


$result = WC_Payment_Gateways::instance();


Since 2.1 Introduced.

Code of WC_Payment_Gateways::instance() WC 5.9.0

public static function instance() {
	if ( is_null( self::$_instance ) ) {
		self::$_instance = new self();
	return self::$_instance;