WC_Payment_Gateway::is_available()

Check if the gateway is available for use.


Description Description


Return Return

(bool)


Top ↑

Source Source

File: includes/abstracts/abstract-wc-payment-gateway.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;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.