Support » Plugin: WooCommerce Square » Square Plugin Broke Suddenly Yesterday

  • Resolved azwp

    (@azwp)


    After installing the WooCommerce Square plugin months ago and having it work to process more than a dozen orders, it suddenly broke yesterday afternoon.

    1) I got an email that said: There was a problem with your Square Access Token
    Heads up! There may be a problem with your connection to Square. In order to continue accepting payments, please disconnect and re-connect your site.

    2) When I went to the site’s settings, there’s now a banner that reads: Heads up! There may be a problem with your connection to Square. In order to continue accepting payments, please disconnect and re-connect your site.

    I’ve seen this issue before on another WP site. I could never get it working (and waited over 7 weeks for a reply here on the forum), so I ended up deleting the Square plugin and using Stripe on that site. I prefer Square and am in a hurry to get this site working again. As I said, it’s been working for months and I don’t know what caused this error. I’m guessing it was a recent update from WC or the Square plugin and I have to say it’s very frustrating when your “fix” for something that wasn’t broken actually breaks it.

    Here’s the actions I’ve taken (that haven’t worked):

    1. I repeatedly disconnected and re-connected. Error banner still there.
    2. I deactivated and deleted the plugin, went to the Square site and updated all my tokens, then re-installed and re-connected the plugin. At this time, I put it in sandbox mode and ran a test order using the updated tokens. The test order went through seemingly fine, even though the dashboard still shows there’s an error.
    3. I checked all location and address settings (even though I haven’t changed them in months) and everything seems to match. I disconnected and reconnected AGAIN. No change.
    4. I checked the log and found this error:
    [errors] => Array
    (
    [0] => stdClass Object
    (
    [code] => UNAUTHORIZED
    [detail] => Your request did not include an Authorization http header with an access token. The header value is expected to be of the format "Bearer TOKEN" (without quotation marks), where TOKEN is to be replaced with your access token (e.g. "Bearer ABC123def456GHI789jkl0"). For more information, see https://docs.connect.squareup.com/api/connect/v2/#requestandresponseheaders. If you are seeing this error message while using one of our officially supported client libraries, please report this to developers@squareup.com.
    [category] => AUTHENTICATION_ERROR

    5. I'm posting this post now. I have no idea how to fix this error. I also wrote to Square (who I love and who I realize aren't responsible for this problematic plugin) and AGAIN begged them to create their own plugin. 🙁

    Also, important note: Whenever I search for solutions in WC documentation or on this forum, invariably it's suggested to "please submit a support ticket at https://woocommerce.com/my-account/create-a-ticket/" but when I follow those links the page says "Note that we only provide assistance for those who have purchased a product at WooCommerce.com. For WooCommerce support, try the: WooCommerce Forums. This is confusing and frustrating. If you're only going to provide support for "purchased products" (even though I do use WC for my shipping--at least when it's working) and not for your free flagship program (the one that gets people in the door), you're doing your brand more harm than good. As I mentioned above, I waited over SEVEN WEEKS on this forum the last time I had this issue and then finally received a response asking if I still had the problem--that certainly didn't inspire me to start spending money on more WC products. LOL.

    If you won't provide support for your key plugins, at least please get all of your support on the same page and stop telling us to "submit a support ticket".

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support AW a11n

    (@slash1andy)

    Automattic Happiness Engineer

    Hey there!

    If you’ve already went through and reauthorized Square, then this kind of problem is usually caused by either a conflict with your theme or with another plugin.
     
    The best way to determine this is to:

    • Temporarily switch your theme to Storefront
    • Disable all plugins except for WooCommerce
    • Repeat the action that is causing the problem

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.

    Thread Starter azwp

    (@azwp)

    Hi,

    Thanks for your reply. I’m familiar with how to eliminate plugin conflicts (been using WP since 2007). 🙂 This is the third site I’ve built with WC and Square (and the Astra Pro theme).

    Even though I have a detailed change log that shows me the time and day when updates were made on the site in question, I did go ahead and check all plugins that had been updated within 24 hours before or after I received the error from the Square plugin. (No theme updates during that timeframe.) I did not find any conflicts.

    Once again, here’s what happened:

    1) The Square plugin has been working on the site for months and has processed a few dozen orders. (I do not use it to synch products with Square; that feature is turned off; I have only one location–online–as all POS events have been cancelled for the foreseeable future.) The last order processed was on Nov. 29 and I used WC shipping on Nov. 30. No known errors, no notifications of errors, everything worked as it should.

    2) On the afternoon of Dec. 2, I suddenly got an email from the site notifying me of the following: “There was a problem with your Square Access Token
    Heads up! There may be a problem with your connection to Square. In order to continue accepting payments, please disconnect and re-connect your site.” When I logged on to the site admin, there was a banner with the same message at the top of the dashboard pages.

    3) I immediately disconnected and re-connected several times but the “heads up” banner remained. I checked the logs and posted the error I found to this board.

    4) Since then, I have: attempted to disconnect and reconnect multiple times; double-checked all addresses and so on to be sure everything matches; repeatedly searched this issue on Google; eliminated any possible plugin conflicts (even though it seems far more likely that the issue is the newest version of the Square plugin and not some other plugin that was updated days before or after I received the error); and switched back to sandbox mode and run a test order (twice). So far, the “heads up” banner remains.

    Note: when I researched this issue (this time and when I had a similar issue on another site months ago–that I was never able to solve, btw), I found many posts reporting the same scenario: the Square plugin randomly stops working every so many months and disconnecting and reconnecting does not solve the problem. Some people even said they just started ignoring the banner because they knew from experience that their site would still process orders and the banner wouldn’t go away no matter how many times they disconnected and reconnected. I’m wondering if there’s something somewhere I need to clear or refresh or delete?

    Otherwise, I am stumped. As it stands right now, I have a WC site that was working fine until Dec. 2 when something interrupted the connection with Square and I have not been able to get it reconnected correctly since.

    Thanks.

    Plugin Support Elvira K

    (@treibalen)

    Hi there @azwp,

    I’m sorry to hear about your experience with Square extension!

    > Your request did not include an Authorization http header with an access token. The header value is expected to be of the format “Bearer TOKEN” (without quotation marks), where TOKEN is to be replaced with your access token (e.g. “Bearer ABC123def456GHI789jkl0”).

    From my experience, this particular error occurs in the following cases:

    Sucuri Security - Auditing, Malware Scanner and Hardening: by Sucuri Inc plugin and Automatic Secret Keys Updater feature. This feature is updating salts once per week. Salts are used as part of the encryption process for tokens and so this weekly change can cause the trouble. Disabling this feature helped in a few cases I saw.

    – Plugin/theme conflict. Square access token and refresh token are sent as URL parameters, so it’s possible that another plugin or theme file is modifying these values before Square is able to store them and connect.

    For the next steps can you please:
    – disable all plugin and switch your theme to Storefront
    – try to reconnect Square
    – check the logs

    Please get back to us if the issue persists after a full conflict test.

    In that case, we’d need to log in to your site and check what’s happening because we can’t replicate this error with the latest Square version. This is when we typically ask to submit a ticket: when a problem needs to be looked at closely and can’t be easily resolved without logging in.

    Cheers!

    Plugin Support Elvira K

    (@treibalen)

    Hi there @azwp,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Square Plugin Broke Suddenly Yesterday’ is closed to new replies.