Payment unavailable if max_amount greater than 0 and order totar greater than max_amount
This commit is contained in:
parent
6081f3b61f
commit
1ed0a9e9db
|
@ -120,7 +120,7 @@ abstract class WC_Payment_Gateway extends WC_Settings_API {
|
||||||
public function is_available() {
|
public function is_available() {
|
||||||
$is_available = ( 'yes' === $this->enabled ) ? true : false;
|
$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;
|
$is_available = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue