Automattic\WooCommerce\Blocks\Payments

Api::is_payment_gateway_enabled()privateWC 1.0

Returns true if the payment gateway is enabled.

Method of the class: Api{}

No Hooks.

Return

true|false.

Usage

// private - for code of main (parent) class only
$result = $this->is_payment_gateway_enabled( $gateway );
$gateway(object) (required)
Payment gateway.

Api::is_payment_gateway_enabled() code WC 9.0.1

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