M
M
Muvka2018-09-26 12:25:02
WooCommerce
Muvka, 2018-09-26 12:25:02

Why does the old order amount appear in fragments?

I delete all applied coupons by ajax request with this code. But for some reason, the amount that comes in the answer remains the old one - with the applied coupon.

function ajax_remove_coupon() {
  global $woocommerce;
  WC()->cart->remove_coupons();
  WC_AJAX::get_refreshed_fragments();
  exit;
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question