WC_Payment_Gateways::instance
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 Payment Gateways::instance WC 11.2.2
public static function instance() {
if ( is_null( self::$_instance ) ) {
self::$_instance = new self();
}
return self::$_instance;
}