/**
 * Removes item from cart via AJAX. Based off edd_ajax_remove_from_cart()
 *
 * @since 1.0
 * @return void
 */
function edd_ajax_remove_from_wish_list()
{
    if (isset($_POST['cart_item'])) {
        edd_remove_from_wish_list($_POST['cart_item'], $_POST['list_id']);
        $list = get_post_meta($_POST['list_id'], 'edd_wish_list', true);
        $return = array('removed' => true);
        // list is empty
        if (!$list) {
            $messages = edd_wl_messages();
            edd_wl_set_message('list_empty', $messages['no_downloads']);
            $return['message'] = html_entity_decode(edd_wl_print_messages(), ENT_COMPAT, 'UTF-8');
        }
        echo json_encode($return);
    }
    edd_die();
}
/**
 * Main Wish List function called by [edd_wish_lists] shortcode
 * This template can be found in the /templates folder. 
 * Copy wish-lists.php to your edd_templates folder in your child theme
 * Would be nice to use get_template_part but you cannot pass variables along
 *
 * @since  1.0
 * @return [type]        [description]
 */
function edd_wl_wish_list()
{
    ob_start();
    echo edd_wl_print_messages();
    edd_get_template_part('wish-lists');
    return ob_get_clean();
}