Code Duplication    Length = 7-7 lines in 2 locations

includes/abstracts/abstract-wc-order.php 1 location

@@ 2293-2299 (lines=7) @@
2290
                'tax_class' => ''
2291
            ) );
2292
2293
            if ( ! empty( $tax_rates ) ) {
2294
                foreach ( $tax_rates as $key => $rate ) {
2295
                    if ( isset( $rate['shipping'] ) && 'yes' === $rate['shipping'] ) {
2296
                        $matched_tax_rates[ $key ] = $rate;
2297
                    }
2298
                }
2299
            }
2300
2301
            $shipping_taxes     = WC_Tax::calc_shipping_tax( $this->order_shipping, $matched_tax_rates );
2302
            $shipping_tax_total = WC_Tax::round( array_sum( $shipping_taxes ) );

includes/class-wc-ajax.php 1 location

@@ 1608-1614 (lines=7) @@
1605
				'tax_class' => ''
1606
			) );
1607
1608
			if ( $tax_rates ) {
1609
				foreach ( $tax_rates as $key => $rate ) {
1610
					if ( isset( $rate['shipping'] ) && 'yes' == $rate['shipping'] ) {
1611
						$matched_tax_rates[ $key ] = $rate;
1612
					}
1613
				}
1614
			}
1615
1616
			$shipping_cost = $shipping_taxes = array();
1617