You appear to be a bot. Output may be restricted
Description
Removes a discount code from the cart via ajax
Usage
$void = edd_ajax_remove_discount();
Parameters
Returns
void
Source
File name: easy-digital-downloads/includes/ajax-functions.php
Lines:
1 to 18 of 18
function edd_ajax_remove_discount() { if ( isset( $_POST['code'] ) ) { edd_unset_cart_discount( urldecode( $_POST['code'] ) ); $total = edd_get_cart_total(); $return = array( 'total' => html_entity_decode( edd_currency_filter( edd_format_amount( $total ) ), ENT_COMPAT, 'UTF-8' ), 'code' => $_POST['code'], 'discounts' => edd_get_cart_discounts(), 'html' => edd_get_cart_discounts_html() ); echo json_encode( $return ); } edd_die(); }