Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 724-729 (lines=6) @@
721
		if ( 'variable' === ( WC_Stripe_Helper::is_pre_30() ? $product->product_type : $product->get_type() ) && isset( $_POST['attributes'] ) ) {
722
			$attributes = array_map( 'wc_clean', $_POST['attributes'] );
723
724
			if ( WC_Stripe_Helper::is_pre_30() ) {
725
				$variation_id = $product->get_matching_variation( $attributes );
726
			} else {
727
				$data_store = WC_Data_Store::load( 'product' );
728
				$variation_id = $data_store->find_matching_product_variation( $product, $attributes );
729
			}
730
731
			if ( ! empty( $variation_id ) ) {
732
				$product = wc_get_product( $variation_id );
@@ 814-819 (lines=6) @@
811
		if ( 'variable' === ( WC_Stripe_Helper::is_pre_30() ? $product->product_type : $product->get_type() ) && isset( $_POST['attributes'] ) ) {
812
			$attributes = array_map( 'wc_clean', $_POST['attributes'] );
813
814
			if ( WC_Stripe_Helper::is_pre_30() ) {
815
				$variation_id = $product->get_matching_variation( $attributes );
816
			} else {
817
				$data_store = WC_Data_Store::load( 'product' );
818
				$variation_id = $data_store->find_matching_product_variation( $product, $attributes );
819
			}
820
821
			WC()->cart->add_to_cart( $product->get_id(), $qty, $variation_id, $attributes );
822
		}