Code Duplication    Length = 4-4 lines in 2 locations

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

@@ 1287-1290 (lines=4) @@
1284
1285
			$code = $tax[ 'name' ];
1286
1287
			if ( ! isset( $tax_totals[ $code ] ) ) {
1288
				$tax_totals[ $code ] = new stdClass();
1289
				$tax_totals[ $code ]->amount = 0;
1290
			}
1291
1292
			$tax_totals[ $code ]->id                = $key;
1293
			$tax_totals[ $code ]->rate_id           = $tax['rate_id'];

includes/class-wc-cart.php 1 location

@@ 793-796 (lines=4) @@
790
				$code = WC_Tax::get_rate_code( $key );
791
792
				if ( $code || $key === apply_filters( 'woocommerce_cart_remove_taxes_zero_rate_id', 'zero-rated' ) ) {
793
					if ( ! isset( $tax_totals[ $code ] ) ) {
794
						$tax_totals[ $code ] = new stdClass();
795
						$tax_totals[ $code ]->amount = 0;
796
					}
797
					$tax_totals[ $code ]->tax_rate_id       = $key;
798
					$tax_totals[ $code ]->is_compound       = WC_Tax::is_compound( $key );
799
					$tax_totals[ $code ]->label             = WC_Tax::get_rate_label( $key );