Prevents the same item from being added to the cart multiple times.
<?php
/*
 * Plugin Name: Easy Digital Downloads - Prevent Duplciate Cart Items
 * Description: Prevents the same item from being added to the cart multiple times.
 * Author: Easy Digital Downloads
 * Author URI: https://easydigitaldownloads.com/
 * Version: 1.0
 */

function pw_edd_prevent_duplicate_cart_items( $download_id, $options ) {
	if( edd_item_in_cart( $download_id, $options ) ) {
		if( edd_is_ajax_enabled() && defined('DOING_AJAX') && DOING_AJAX ) {
			die('1');
		} else {
			wp_redirect( edd_get_checkout_uri() ); exit;
		}
	}
}
add_action( 'edd_pre_add_to_cart', 'pw_edd_prevent_duplicate_cart_items', 10, 2 );
To implement this snippet on your site, create a brand new, empty WordPress plugin and paste the above code inside.