WooCommerce Square auto-sync not working
-
Hi,
I am having problems getting auto-sync working. Manual sync from Square works fine, but the hourly auto-sync background job does not.
I’m using WooCommerce v4.0.1 and WooCommerce Square v2.1.1 with a custom theme.
In WooCommerce > Status > Logs I see the following error that seems related:
2020-04-28T20:49:37+00:00 CRITICAL Uncaught Error: Call to a member function getCursor() on string in /www/REDACTED/public/wp-content/plugins/woocommerce-square/includes/Sync/Interval_Polling.php:194
I’ve pieced together some advice from different threads and I can share what I’ve tried so far.
First, I followed the configuration directions here.
I installed WP Crontrol and tried running the
woocommerce_square_inventory_poll
hook manually with no luck. I found a forum post that made it sound like thewoocommerce_square_inventory_poll
hook’s action should be set toWC_Square_Inventory_Poll->sync()
. My action is set to “None”, which seems like it might be wrong.I found this post that suggested using the Health Check plugin to enter troubleshooting mode. I did this, flipped to the default Twenty Twenty theme and activated only the WooCommerce and WooCommerce Square plugins, but I still had problems.
Next I found this forum post that suggested using a test URL to check the health of the background processing job:
https://<my_domain>/wp-admin/admin-ajax.php?action=wc_square_background_sync_test
It looks like a healthy response body should contain “[TEST_LOOPBACK]”, but I am getting “0” in the response body.
I’ve also seen this message pop up in an alert at the top of the Tools > Cron events screen:
WooCommerce Square: It looks like your site does not support background processing, which means large numbers of products may not sync successfully with Square. Read more here on how to resolve this.
The Health Check plugin says that loopback is working however. Googling for that error, I found this forum post that says the Wordfence plugin sometimes causes problems. I deactivated it and tried all the steps above, but no luck. I also tried re-installing and re-activating the WooCommerce Square plugin with Wordfence turned off, but that didn’t work.
Any suggestions?
- The topic ‘WooCommerce Square auto-sync not working’ is closed to new replies.