Code Duplication    Length = 7-7 lines in 2 locations

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

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

includes/class-wc-ajax.php 1 location

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