• Resolved yogesh.patel.thesslstore

    (@yogeshpatelthesslstore)


    Hi
    Today i have updated my woocommerce to latest version.
    After that whenever i try to checkout with Paypal express it throws error “SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data”.
    I have virtual product with variations.
    Other payment gateway is working fine.

    Can you please look on it?
    Please let me know any help or data required.

    Thanks in advance.

    https://www.ads-software.com/plugins/paypal-for-woocommerce/

Viewing 3 replies - 46 through 48 (of 48 total)
  • Plugin Contributor angelleye

    (@angelleye)

    If the feature is that important to you immediately then it seems that may be your only option.

    Either that or go ahead and buy the WooThemes PayPal Pro extension, which would most likely not have this problem (I can only assume).

    That may be something you can do temporarily, and then when we get this fixed in ours you could switch back so you don’t have to keep buying their license every year.

    dsc3333

    (@dsc3333)

    I have had this same issue for a few days!
    I found out that the problem starts at WooCommerse version 2.4.0. v2.3.13 is that last version when this JSON error doesnt occur.

    im on WordPress 4.4.2 and WooCommerse 2.5.5
    But I think I have a fix that did work in my case..
    1. Problem is at \wp-content\plugins\woocommerce\assets\js\frontend\checkout.min.js
    2. You need to sexify you .JS so you can actually read it. I used https://jsbeautifier.org/. Just copy and paste the text into here and click on “beutify javascript”
    3. Open the new sexy .JS file into notepad+ or similar to see line numbers.
    4. On line number 148 you will see this:
    1 !== d[“blockUI.isBlocked”] && c.block({

    Looks odd yeah?
    Now put the “if(” in front and fix the backwards “(” after c.block.
    The result is:
    if( 1 !== d[“blockUI.isBlocked”] && c.block){

    Now it looks like a proper conditional statement desnt it! ??

    Looks like some condition cause thing to get missed up because of the statement in that line.

    For all of you that are wondering.. If you simply left out the “if(” but had the “(” after the c.block statement the correct way”)” the error wouldnt pop up.
    So either the programmer made the mistake of forgetting the “if(” and putting the “)” backwards *cough*, or the utility used to minify the code picked up the error and corrected it with a bracket in the other direction!

    Anyway..
    This should work on WooCommerse from 2.4.0+
    I hope this is [SOLVED] now..

    Plugin Contributor angelleye

    (@angelleye)

    We did make some more adjustments to this on our end and just recently pushed everything into the dev branch on GitHub. We have been able to successfully test with 3d secure all the way through on the latest versions of everything.

    If you want to download that version you can grab it here: https://github.com/angelleye/paypal-woocommerce/archive/dev.zip

    It will be included in the 1.2.0 release coming soon.

Viewing 3 replies - 46 through 48 (of 48 total)
  • The topic ‘Json error on checkout page’ is closed to new replies.