Automattic\WooCommerce\Blocks\Payments

Api::is_payment_gateway_enabled()privateWC 1.0

Returns true if the payment gateway is enabled.

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

Хуков нет.

Возвращает

true|false.

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

// private - только в коде основоного (родительского) класса
$result = $this->is_payment_gateway_enabled( $gateway );
$gateway(объект) (обязательный)
Payment gateway.

Код Api::is_payment_gateway_enabled() WC 8.7.0

private function is_payment_gateway_enabled( $gateway ) {
	return filter_var( $gateway->enabled, FILTER_VALIDATE_BOOLEAN );
}