Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 704-710 (lines=7) @@
701
				'tax_class' => ''
702
			) );
703
704
			if ( ! empty( $tax_rates ) ) {
705
				foreach ( $tax_rates as $key => $rate ) {
706
					if ( isset( $rate['shipping'] ) && 'yes' === $rate['shipping'] ) {
707
						$matched_tax_rates[ $key ] = $rate;
708
					}
709
				}
710
			}
711
712
			$shipping_taxes     = WC_Tax::calc_shipping_tax( $this->order_shipping, $matched_tax_rates );
713
			$shipping_tax_total = WC_Tax::round( array_sum( $shipping_taxes ) );

includes/class-wc-ajax.php 1 location

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