@@ 97-106 (lines=10) @@ | ||
94 | $has_coupon = false; |
|
95 | $has_met_min_amount = false; |
|
96 | ||
97 | if ( in_array( $this->requires, array( 'coupon', 'either', 'both' ) ) ) { |
|
98 | if ( $coupons = WC()->cart->get_coupons() ) { |
|
99 | foreach ( $coupons as $code => $coupon ) { |
|
100 | if ( $coupon->is_valid() && $coupon->enable_free_shipping() ) { |
|
101 | $has_coupon = true; |
|
102 | break; |
|
103 | } |
|
104 | } |
|
105 | } |
|
106 | } |
|
107 | ||
108 | if ( in_array( $this->requires, array( 'min_amount', 'either', 'both' ) ) && isset( WC()->cart->cart_contents_total ) ) { |
|
109 | if ( WC()->cart->prices_include_tax ) { |
@@ 153-162 (lines=10) @@ | ||
150 | $has_coupon = false; |
|
151 | $has_met_min_amount = false; |
|
152 | ||
153 | if ( in_array( $this->requires, array( 'coupon', 'either', 'both' ) ) ) { |
|
154 | ||
155 | if ( $coupons = WC()->cart->get_coupons() ) { |
|
156 | foreach ( $coupons as $code => $coupon ) { |
|
157 | if ( $coupon->is_valid() && $coupon->enable_free_shipping() ) { |
|
158 | $has_coupon = true; |
|
159 | } |
|
160 | } |
|
161 | } |
|
162 | } |
|
163 | ||
164 | if ( in_array( $this->requires, array( 'min_amount', 'either', 'both' ) ) && isset( WC()->cart->cart_contents_total ) ) { |
|
165 | if ( WC()->cart->prices_include_tax ) { |