Payment unavailable if max_amount greater than 0 and order totar greater than max_amount

This commit is contained in:
Mikel Martin 2014-08-17 22:10:35 +02:00
parent 6081f3b61f
commit 1ed0a9e9db
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}