Code Duplication    Length = 11-11 lines in 2 locations

includes/shipping/legacy-free-shipping/class-wc-shipping-legacy-free-shipping.php 1 location

@@ 164-174 (lines=11) @@
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 ) {
166
				$total = WC()->cart->cart_contents_total + array_sum( WC()->cart->taxes );
167
			} else {
168
				$total = WC()->cart->cart_contents_total;
169
			}
170
171
			if ( $total >= $this->min_amount ) {
172
				$has_met_min_amount = true;
173
			}
174
		}
175
176
		switch ( $this->requires ) {
177
			case 'min_amount' :

includes/shipping/free-shipping/class-wc-shipping-free-shipping.php 1 location

@@ 120-130 (lines=11) @@
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 ) {
122
				$total = WC()->cart->cart_contents_total + array_sum( WC()->cart->taxes );
123
			} else {
124
				$total = WC()->cart->cart_contents_total;
125
			}
126
127
			if ( $total >= $this->min_amount ) {
128
				$has_met_min_amount = true;
129
			}
130
		}
131
132
		switch ( $this->requires ) {
133
			case 'min_amount' :