From 17be144f78ab34124d70ce8885df0e4d11b9a3be Mon Sep 17 00:00:00 2001 From: kcppdevelopers Date: Thu, 26 Apr 2018 13:56:01 +0530 Subject: [PATCH] clear notice, ref #1106 --- .../class-wc-gateway-paypal-express-helper-angelleye.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-helper-angelleye.php b/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-helper-angelleye.php index 7c156b501..db9216304 100644 --- a/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-helper-angelleye.php +++ b/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-helper-angelleye.php @@ -875,8 +875,12 @@ public function angelleye_ajax_generate_cart() { } WC()->cart->calculate_totals(); } + if (ob_get_length()) ob_end_clean(); + ob_start(); wp_send_json(array('url' => $url)); } catch (Exception $ex) { + if (ob_get_length()) ob_end_clean(); + ob_start(); wp_send_json(array('url' => $url)); } }