@@ 397-399 (lines=3) @@ | ||
394 | * @throws Exception |
|
395 | */ |
|
396 | private function validate_minimum_amount() { |
|
397 | if ( $this->minimum_amount > 0 && apply_filters( 'woocommerce_coupon_validate_minimum_amount', wc_format_decimal( $this->minimum_amount ) > WC()->cart->get_displayed_subtotal(), $this ) ) { |
|
398 | throw new Exception( self::E_WC_COUPON_MIN_SPEND_LIMIT_NOT_MET ); |
|
399 | } |
|
400 | } |
|
401 | ||
402 | /** |
|
@@ 408-410 (lines=3) @@ | ||
405 | * @throws Exception |
|
406 | */ |
|
407 | private function validate_maximum_amount() { |
|
408 | if ( $this->maximum_amount > 0 && apply_filters( 'woocommerce_coupon_validate_maximum_amount', wc_format_decimal( $this->maximum_amount ) <= WC()->cart->get_displayed_subtotal(), $this ) ) { |
|
409 | throw new Exception( self::E_WC_COUPON_MAX_SPEND_LIMIT_MET ); |
|
410 | } |
|
411 | } |
|
412 | ||
413 | /** |