Code Duplication    Length = 6-6 lines in 2 locations

includes/payment-methods/class-wc-stripe-payment-request.php 2 locations

@@ 788-793 (lines=6) @@
785
		if ( 'variable' === ( WC_Stripe_Helper::is_pre_30() ? $product->product_type : $product->get_type() ) && isset( $_POST['attributes'] ) ) {
786
			$attributes = array_map( 'wc_clean', $_POST['attributes'] );
787
788
			if ( WC_Stripe_Helper::is_pre_30() ) {
789
				$variation_id = $product->get_matching_variation( $attributes );
790
			} else {
791
				$data_store = WC_Data_Store::load( 'product' );
792
				$variation_id = $data_store->find_matching_product_variation( $product, $attributes );
793
			}
794
795
			if ( ! empty( $variation_id ) ) {
796
				$product = wc_get_product( $variation_id );
@@ 878-883 (lines=6) @@
875
		if ( 'variable' === ( WC_Stripe_Helper::is_pre_30() ? $product->product_type : $product->get_type() ) && isset( $_POST['attributes'] ) ) {
876
			$attributes = array_map( 'wc_clean', $_POST['attributes'] );
877
878
			if ( WC_Stripe_Helper::is_pre_30() ) {
879
				$variation_id = $product->get_matching_variation( $attributes );
880
			} else {
881
				$data_store = WC_Data_Store::load( 'product' );
882
				$variation_id = $data_store->find_matching_product_variation( $product, $attributes );
883
			}
884
885
			WC()->cart->add_to_cart( $product->get_id(), $qty, $variation_id, $attributes );
886
		}