• Join me on a little adventure through plugin code.

    My client reported that their WooCommerce orders were coming in with no shipping address. I discovered a JavaScript error that was appearing on every single page of their site, “Error: invalid version specified” which was tied to loading the Facebook JavaScript SDK.

    I had a hunch this JavaScript error was causing a cascading effect that was preventing Woo’s JavaScript that dynamically shows the shipping address fields and the “Ship to a different address?” checkbox from working.

    Now, to check that, I just had to figure out which plugin on their site was trying to load this Facebook SDK with an “invalid version.”

    Ultimately I had to download their entire plugins directory and do a multi-file search to find the culprit, which was this plugin, Simple Share Buttons Adder.

    I deactivated Simple Share Buttons Adder and, sure enough, the WooCommerce checkout page started working, and the JavaScript error on every page of the site was now gone.

    I’m guessing it’s probably a fairly trivial fix within this plugin (probably in lines 130-132 of class-styles.php) to resolve the issue.

Viewing 1 replies (of 1 total)
  • Plugin Contributor ShareThis

    (@sharethis)

    Hey @room34

    Thank you for contacting us on this issue.

    We deeply apologize for all you went through trying to find the root cause of the error. We have reported this issue to our engineers so they can take a better look into it and fix it in a future version.

    If you have any other questions or you want to share more information about this with us just let us know here or at [email protected]

Viewing 1 replies (of 1 total)

The topic ‘Causing a JavaScript error on every page’ is closed to new replies.