Code Duplication    Length = 13-13 lines in 2 locations

includes/payments/functions.php 2 locations

@@ 88-100 (lines=13) @@
85
86
			break;
87
88
		case 'key':
89
			$payment = give_get_payments(
90
				array(
91
					'meta_key'       => '_give_payment_purchase_key',
92
					'meta_value'     => $value,
93
					'posts_per_page' => 1,
94
					'fields'         => 'ids',
95
				)
96
			);
97
98
			if ( $payment ) {
99
				$payment = new Give_Payment( $payment[0] );
100
			}
101
102
			break;
103
@@ 104-116 (lines=13) @@
101
102
			break;
103
104
		case 'payment_number':
105
			$payment = give_get_payments(
106
				array(
107
					'meta_key'       => '_give_payment_number',
108
					'meta_value'     => $value,
109
					'posts_per_page' => 1,
110
					'fields'         => 'ids',
111
				)
112
			);
113
114
			if ( $payment ) {
115
				$payment = new Give_Payment( $payment[0] );
116
			}
117
118
			break;
119