Automattic\WooCommerce\Blocks\Payments
Api::is_payment_gateway_enabled
Returns true if the payment gateway is enabled.
Method of the class: Api{}
No Hooks.
Returns
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() Api::is payment gateway enabled code WC 10.8.1
private function is_payment_gateway_enabled( $gateway ) {
return filter_var( $gateway->enabled, FILTER_VALIDATE_BOOLEAN );
}