| @@ 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 ) { | 
                                |
| @@ 109-118 (lines=10) @@ | ||
| 106 | $has_coupon = false;  | 
                                |
| 107 | $has_met_min_amount = false;  | 
                                |
| 108 | ||
| 109 | 		if ( in_array( $this->requires, array( 'coupon', 'either', 'both' ) ) ) { | 
                                |
| 110 | 			if ( $coupons = WC()->cart->get_coupons() ) { | 
                                |
| 111 | 				foreach ( $coupons as $code => $coupon ) { | 
                                |
| 112 | 					if ( $coupon->is_valid() && $coupon->enable_free_shipping() ) { | 
                                |
| 113 | $has_coupon = true;  | 
                                |
| 114 | break;  | 
                                |
| 115 | }  | 
                                |
| 116 | }  | 
                                |
| 117 | }  | 
                                |
| 118 | }  | 
                                |
| 119 | ||
| 120 | 		if ( in_array( $this->requires, array( 'min_amount', 'either', 'both' ) ) && isset( WC()->cart->cart_contents_total ) ) { | 
                                |
| 121 | 			if ( WC()->cart->prices_include_tax ) { | 
                                |