Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 697-703 (lines=7) @@
694
				'tax_class' => ''
695
			) );
696
697
			if ( ! empty( $tax_rates ) ) {
698
				foreach ( $tax_rates as $key => $rate ) {
699
					if ( isset( $rate['shipping'] ) && 'yes' === $rate['shipping'] ) {
700
						$matched_tax_rates[ $key ] = $rate;
701
					}
702
				}
703
			}
704
705
			$shipping_taxes     = WC_Tax::calc_shipping_tax( $this->order_shipping, $matched_tax_rates );
706
			$shipping_tax_total = WC_Tax::round( array_sum( $shipping_taxes ) );

includes/class-wc-ajax.php 1 location

@@ 1589-1595 (lines=7) @@
1586
				'tax_class' => ''
1587
			) );
1588
1589
			if ( $tax_rates ) {
1590
				foreach ( $tax_rates as $key => $rate ) {
1591
					if ( isset( $rate['shipping'] ) && 'yes' == $rate['shipping'] ) {
1592
						$matched_tax_rates[ $key ] = $rate;
1593
					}
1594
				}
1595
			}
1596
1597
			$shipping_cost = $shipping_taxes = array();
1598