Just as a favor to anyone out there that may be experiencing this issue with WooCommerce as of 2.4, I wanted to post the solution that we found. I’m sure this won’t be the end-all solution for everyone, but it may help some of you.
WooCommerce Checkout Not Working Upon Update
Check that your payment gateway isn’t using this method:
$order->payment_complete();
For some reason, using that method had always worked in the past, but now was triggering some non-JSON responses upon checkout. Instead, manually update the stock levels and status like so:
$order->update_status('processing', __( 'Awaiting fulfillment.', 'woocommerce' ));
// Reduce stock levels
$order->reduce_order_stock();
// Remove cart
WC()->cart->empty_cart();
Hope this saves someone a lot of headache!
Earn Free Recharge Anytime Anywhere. Just try free apps and earn unlimited mobile talktime and PayTm cash.
You can also earn money and PayTm cash by Referring to your Friends. Recharge your mobile instantly.
https://goo.gl/lhiB47
Just download thE EARN MONEY app and recharge your mobile for free…Get upto Rs 250/- per successful referral.
https://goo.gl/lhiB47
Hi Allen, I’m facing the Woocommerce SyntaxError when I try to checkout by a bank transfer. Where you write the code you put up?
Thanks in advance