diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 50ea9c07de1..59f7d40db5d 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -1262,20 +1262,18 @@ class WC_AJAX { $taxes = array(); $shipping_taxes = array(); - // Prevent undefined warnings - if ( ! isset ( $items['order_taxes'] ) ) { - $items['order_taxes'] = array(); - } - if ( ! isset ( $items['line_tax'] ) ) { - $items['line_tax'] = array(); - } - if ( ! isset ( $items['line_subtotal_tax'] ) ) { - $items['line_subtotal_tax'] = array(); - } - // Parse the jQuery serialized items parse_str( $_POST['items'], $items ); + // Prevent undefined warnings + if ( ! isset( $items['line_tax'] ) ) { + $items['line_tax'] = array(); + } + if ( ! isset( $items['line_subtotal_tax'] ) ) { + $items['line_subtotal_tax'] = array(); + } + $items['order_taxes'] = array(); + // Get items and fees taxes if ( isset( $items['order_item_id'] ) ) {