From 1ed0a9e9dbb0b6631a1d91410a5d5ed04cfa1bd8 Mon Sep 17 00:00:00 2001 From: Mikel Martin Date: Sun, 17 Aug 2014 22:10:35 +0200 Subject: [PATCH] Payment unavailable if max_amount greater than 0 and order totar greater than max_amount --- includes/abstracts/abstract-wc-payment-gateway.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/abstracts/abstract-wc-payment-gateway.php b/includes/abstracts/abstract-wc-payment-gateway.php index c4a2e23da4a..c694406cf9f 100644 --- a/includes/abstracts/abstract-wc-payment-gateway.php +++ b/includes/abstracts/abstract-wc-payment-gateway.php @@ -120,7 +120,7 @@ abstract class WC_Payment_Gateway extends WC_Settings_API { public function is_available() { $is_available = ( 'yes' === $this->enabled ) ? true : false; - if ( WC()->cart && 0 < $this->get_order_total() && $this->max_amount >= $this->get_order_total() ) { + if ( WC()->cart && 0 < $this->get_order_total() && 0 < $this->max_amount && $this->max_amount < $this->get_order_total() ) { $is_available = false; }