Code Duplication    Length = 7-7 lines in 2 locations

includes/class-wc-ajax.php 1 location

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

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 ) );