Posted: November 7, 2023 at 7:29 pm
The Square plugin failed to reauthorize again. This has been happening every month since we started using the plugin in February. Nine months of this issue without it being resolved. You can see all of my prior support tickets. Please fix it. Also, why do you prevent comments on open tickets? It requires us to create a new support ticket while the previous ones remain open without comments. |
|
Do you have a status on this issue? In the last support post we were told it was a high priority, but it would be helpful to know where you are in the process of fixing the plugin. |
|
This reply has been marked as private. | |
Thanks for this information. I uploaded and updated the plugin from the link and checked the cron events to see if the AHEEA_Square_oauth_health_check showed up, and it did with the recurrence set to twice daily. In previous support post, you requested that I test that, and it didn’t show up so that’s a good sign. Regarding the debug run, the output I received is string(2) “21”. Is that good? Previous support post: |
|
That’s great so far! So now… the oAuth key should renew after the 6th day (they are valid for 30days)… so 21 means you over that. The next time the cron runs that should reset and shot 30 again. So either later or tomorrow, run that code again and see if the number updates to 30/29…. if it does… its working! Side note… please don’t force the cron go run manually to check the above, that’s going to reset the days but you don’t know if that will happen automatically and will need to wait another 6 days to test again. |
|
Sounds good. I’ll let you know what I find. As far as the cron jobs, I didn’t do anything manually. I just searched the term AHEEA_Square_oauth_health_check, to see if it was there because the last time we worked on this it wasn’t. Do you recommend deleting the WP-Cron plugin? |
|
When I logged into the WP dashboard this morning I saw the re-authorization failure message. Since I updated the plugin and ran the tests you requested, I decided right now to disconnect and reconnect Square to start fresh with 30 days. After doing that I ran the code and received this output: string(2) “29”. I’m assuming that’s good news. And that on 12/15 around this time it should refresh for another 30 days. Is that correct? Should I run the debug code on 12/15 to see if it shows 30 days? |
|
No, not for now, keep it as it helps when checking if the cron is set.
That means the cron ran but couldn’t renew your key… the key is valid for 30 days so if it can’t renew it keeps the current key and displays a notice to give time to fix it.
OK, so we are starting fresh, but…
Yes, that’s good news, it means your key correctly connected and is valid for 30 days, but…
No, Square recommends refreshing the key every 6 days and the reason for that is part of what I mentioned above. When you obtain a key, it’s valid for 30 days, if we wait until day say day 29/30 and it doesn’t refresh it doesn’t give you any time to fix it before payments stop working (similar situation you were getting into when the key wouldn’t renew). So that means:
No, you should run that code again in 6/7 days and it should ‘reset’ to show 30/29 days again each time. If the key doesn’t renew on day 6 the notice is displayed in the admin, the square payment method should still work at that point but the key couldn’t renew and will stop working after the key expires at the end of the days. Give it 6 days, run the code and let me know what it shows…. if at any point from now over the next say 7 days you get a notice about the key not renewing let me know. At that point we’ll need to add some code to the site and see the specific request/response to figure this out (hopefully once and for all). |
|
Will do. Thanks! |
|
It’s been 11 days and I reran the code and got this: string(2) “19” |
|
The token should have already refreshed and that gives us 19 days to troubleshoot before you end up back in the same old situation. This is why this has been so tricky to troubleshoot, that version is refreshing the access token fine for me on multiple different servers/sites. — Install this plugin: https://wordpress.org/plugins/log-http-requests/ Once that has been installed and activated… go to Settings -> Cron Events. Find ‘AHEEA_Square_oauth_health_check’, is that set to run Hover over it and click run now. Then re-run that test code I gave you above, still 19? |
|
In cron events, I clicked on Run Now under AHEEA_Square_oauth_health_check where the action is EED_OAuthHealthCheck::scheduledHealthCheck() and then re-ran the test code in the Debug Console and the output is 17. How long does it take for the Run Now to complete. Is it instantaneous? Or should I wait a few minutes and re-run the debug? |
|
It should be instant. If you now go to Tools -> Log HTTP Requests. Do you see a request to If so, what is the request/response for that? Or if you prefer I take a look directly within the admin you can send temp login details over using this form: |
|
When I go to Tools> Log Http Requests, there isn’t a request for https://connect.eventespresso.com/square_sandbox/refresh I only see URLS for ipecho.net, tnedi.me, ident.me, font.google.apis, and api.wordpress.org |
|
This reply has been marked as private. | |
Thank you, so you’re site is missing the refresh token so Square isn’t going to refresh. Can you disconnect Square and Reconnect it please, I want to view the logs ona connect request to confirm a value for the refresh token is being received by Square when you connect. |
|
This reply has been marked as private. | |
This reply has been marked as private. | |
Hmmm ok! Very strange. The request to reconnect doesn’t provide a I’ve asked for some feedback on this and will let you know what we find. |
|
Thanks! I look forward to learning the reason. |
|
You must be logged in to reply to this support post. Sign In or Register for an Account