Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 717-722 (lines=6) @@
714
		if ( 'variable' === ( WC_Stripe_Helper::is_pre_30() ? $product->product_type : $product->get_type() ) && isset( $_POST['attributes'] ) ) {
715
			$attributes = array_map( 'wc_clean', $_POST['attributes'] );
716
717
			if ( WC_Stripe_Helper::is_pre_30() ) {
718
				$variation_id = $product->get_matching_variation( $attributes );
719
			} else {
720
				$data_store = WC_Data_Store::load( 'product' );
721
				$variation_id = $data_store->find_matching_product_variation( $product, $attributes );
722
			}
723
724
			if ( ! empty( $variation_id ) ) {
725
				$product = wc_get_product( $variation_id );
@@ 807-812 (lines=6) @@
804
		if ( 'variable' === ( WC_Stripe_Helper::is_pre_30() ? $product->product_type : $product->get_type() ) && isset( $_POST['attributes'] ) ) {
805
			$attributes = array_map( 'wc_clean', $_POST['attributes'] );
806
807
			if ( WC_Stripe_Helper::is_pre_30() ) {
808
				$variation_id = $product->get_matching_variation( $attributes );
809
			} else {
810
				$data_store = WC_Data_Store::load( 'product' );
811
				$variation_id = $data_store->find_matching_product_variation( $product, $attributes );
812
			}
813
814
			WC()->cart->add_to_cart( $product->get_id(), $qty, $variation_id, $attributes );
815
		}