Code Duplication    Length = 5-5 lines in 3 locations

includes/admin/donors/donor-actions.php 3 locations

@@ 141-145 (lines=5) @@
138
139
	$output = give_connect_user_donor_profile( $donor, $donor_data, $address );
140
141
	if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
142
		header( 'Content-Type: application/json' );
143
		echo wp_json_encode( $output );
144
		wp_die();
145
	}
146
147
	if ( $output['success'] ) {
148
		wp_safe_redirect( add_query_arg(
@@ 329-333 (lines=5) @@
326
	 */
327
	do_action( 'give_post_donor_disconnect_user_id', $donor_id );
328
329
	if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
330
		header( 'Content-Type: application/json' );
331
		echo json_encode( $output );
332
		wp_die();
333
	}
334
335
	return $output;
336
@@ 420-424 (lines=5) @@
417
418
	do_action( 'give_post_add_donor_email', $donor_id, $args );
419
420
	if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
421
		header( 'Content-Type: application/json' );
422
		echo json_encode( $output );
423
		wp_die();
424
	}
425
426
	return $output;
427
}