WC_Payment_Gateways::instance()public staticWC 2.1

Main WC_Payment_Gateways Instance.

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

Метод класса: WC_Payment_Gateways{}

Хуков нет.

Возвращает

WC_Payment_Gateways. Main instance

Использование

$result = WC_Payment_Gateways::instance();

Список изменений

С версии 2.1 Введена.

Код WC_Payment_Gateways::instance() WC 8.7.0

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