Code Duplication    Length = 9-9 lines in 2 locations

includes/class-wc-stripe-apple-pay.php 1 location

@@ 667-675 (lines=9) @@
664
		);
665
666
		// Include fees and taxes as displayItems.
667
		foreach ( WC()->cart->fees as $key => $fee ) {
668
			$data['items'][] = array(
669
				'label'  => $fee->name,
670
				'amount' => array(
671
					'currency' => $currency,
672
					'value'    => $fee->amount,
673
				),
674
			);
675
		}
676
		if ( 0 < $tax_total ) {
677
			$data['items'][] = array(
678
				'label'  => __( 'Tax', 'woocommerce-gateway-stripe' ),

includes/class-wc-stripe-payment-request.php 1 location

@@ 343-351 (lines=9) @@
340
			}
341
		}
342
		// Include fees and taxes as display items.
343
		foreach ( WC()->cart->fees as $key => $fee ) {
344
			$items[] = array(
345
				'label'  => $fee->name,
346
				'amount' => array(
347
					'currency' => $currency,
348
					'value'    => $fee->amount,
349
				),
350
			);
351
		}
352
		// The tax total may include the shipping taxes if a shipping option is provided.
353
		if ( 0 < $tax_total ) {
354
			$items[] = array(