Title: Unexpected Token Issue
Last modified: August 30, 2016

---

# Unexpected Token Issue

 *  [Ojay](https://wordpress.org/support/users/ojay/)
 * (@ojay)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/unexpected-token-issue/)
 * Hi there,
 * A client of mine is having a lot of issues with the Unexpected Token issue that’s
   been around since the last woo update. From all the reading I’ve done the issue
   occurs because of some kind of error reporting, or sometimes html being returned
   before the ajax response.
 * I’ve looked in to these avenues and am struggling to find a resolution. I’m using
   the latest version of your plugin, along with the latest versions of everything
   else.
 * The ajax response I’m getting is successful…
 *     ```
       Time took: 1816.406ms
       {"result":"success","redirect":"https:\/\/www.ourwebaddress.com\/checkout\/order-received\/51969?key=wc_order_561401c52d5db"}
       ```
   
 * That’s the whole response, so no html before the response… should that “Time 
   Took” be there?? The order comes through as successful in WP admin, it’s almost
   as if everything is working fine… but the redirect to the order confirmation 
   is being halted by the Unexpected Token issue.
 * I’ve tried de-activating all plugins, that made no difference, the error remained.
 * I’m a bit lost, I’m not sure what else to do?
 * [https://wordpress.org/plugins/paypal-for-woocommerce/](https://wordpress.org/plugins/paypal-for-woocommerce/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [angelleye](https://wordpress.org/support/users/angelleye/)
 * (@angelleye)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/unexpected-token-issue/#post-6620299)
 * So sorry for the delay responding. Just browsing through support history and 
   realized there were some I somehow missed.
 * Where exactly are you seeing the unexpected token error? Is that coming up in
   Firebug when you look in the console, or is that coming up on the front end of
   the site, or what?
 *  Thread Starter [Ojay](https://wordpress.org/support/users/ojay/)
 * (@ojay)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/unexpected-token-issue/#post-6620302)
 * No worries mate, thanks for getting back to me.
    Sorry, the unexpected token 
   error appears on the front end, at checkout… once the payment button has been
   clicked.
 * I’ve spoken to Woo about the issue too, and they’re positive that the “Time took:
   1816.406ms” shouldn’t be there. Would or could that response have anything to
   do with your plugin??
 * Thanks for your help

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Unexpected Token Issue’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/paypal-for-woocommerce_dce4f5.svg)
 * [PayPal for WooCommerce](https://wordpress.org/plugins/paypal-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/paypal-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/paypal-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/paypal-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/paypal-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/paypal-for-woocommerce/reviews/)

## Tags

 * [Unexpected](https://wordpress.org/support/topic-tag/unexpected/)

 * 2 replies
 * 2 participants
 * Last reply from: [Ojay](https://wordpress.org/support/users/ojay/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/unexpected-token-issue/#post-6620302)
 * Status: not resolved