• Resolved whitmason

    (@whitmason)


    On the checkout page, WooSquare is throwing an error “locationId is required”. WooSquare works fine in sandbox but not in production mode. In Chrome on Windows, user clicks the “Place Order” button, but the first time nothing happens but you see the error in the Chrome Console. Clicking the button again causes the transaction to go through fine. Problem is that some customers don’t realize that their order was not processed, so we end up with an abandoned cart.

    URL given is a test site. Production site has the same problem. Can look at source code of checkout page and see that locationId is blank in the var square_params. Using free version of WooSquare v3.6.2. Latest version of WordPress and WooCommerce. Connected Square automatically, and locationID in admin area has a value for production.

    Steps to reproduce:
    – use Chrome browser on Windows desktop
    – put something in basket
    – go to checkout page
    – fill in name, address, etc
    – use testing credit card number, any future date, cvv and postal code (note – error occurs with real credit cards too)
    – click “Place Order button” with mouse
    – nothing appears to happen, but locationId error appears in Console
    – in production with valid credit card data, the transaction goes through after you click the Place Order button again

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @whitmason,
    Thanks for reporting we have forwarded the details to the technical team to assist you further will update you in a while,

    Hi @whitmason,
    Please make sure that you have selected the location in the Woo Square Settings page as shown in the screenshot shared below .
    https://prnt.sc/svx20t

    Thread Starter whitmason

    (@whitmason)

    The location was already selected. I selected it again and saved, but problem still occurs.

    From looking at WooSquare code, the problem may be that there are 4 cases where this line appears

    `$location = get_option(‘woo_square_location_id’);

    but that option is never set anywhere. Usually the option for location is called woo_square_location_id_free

    • This reply was modified 5 years, 11 months ago by whitmason.

    Hi @whitmason,

    We have replicated the issue and our development team is currently working fox fixing the issue.
    Soon we release an update with the fix.

    Thanks

    Hi @whitmason,

    We have done some code changes in the plugin please test it and let us know once you approve then we will release an update.

    WooSquare plugin.

    Please download the plugin from the above link.

    Thanks

    Thread Starter whitmason

    (@whitmason)

    The specific error I reported is fixed in the new version. However, only one of the 4 places in the code that I posted was changed. I do not know if the error will occur in other test cases such as when processing refunds.

    Also, the new version still does not fix the internal server error I reported a few weeks ago. The error is caused by obsolete calls for some order methods. My production server expects code to run clean. I corrected the errors on my sites, but the plugin itself should be fixed.

    Plugin Author WPExperts.io

    (@wpexpertsio)

    Hi @whitmason,
    Can you please share the screenshots where are you viewing all the errors so we can fix this in our upcoming update.

    Thread Starter whitmason

    (@whitmason)

    I did not actually cause all the errors related to ‘woo_square_location_id’, but logically if this option is never set, then it might cause problems when trying to get it.

    For the internal server errors, I described the problem in this topic. Updating the code so that is does not use obsolete code fixed the problems I was seeing.

    https://ww.wp.xz.cn/support/topic/internal-server-error-611/

    Hi @whitmason,
    Please use the plugin files shared below if you are still facing any issues please do let us know.

    https://we.tl/t-AynE78FeJB

    Thanks!

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

The topic ‘locationId is required’ is closed to new replies.