WordPress at Your Fingertips
function is not described

WC_Payment_Gateway::is_available() public WC 1.0

Check if the gateway is available for use.

{} It's a method of the class: WC_Payment_Gateway{}

No Hooks.

Return

true|false.

Usage

$WC_Payment_Gateway = new WC_Payment_Gateway();
$WC_Payment_Gateway->is_available();

Code of WC_Payment_Gateway::is_available() WC 5.5.2

<?php
public function is_available() {
	$is_available = ( 'yes' === $this->enabled );

	if ( WC()->cart && 0 < $this->get_order_total() && 0 < $this->max_amount && $this->max_amount < $this->get_order_total() ) {
		$is_available = false;
	}

	return $is_available;
}