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)); } }