• Resolved ctrombley

    (@ctrombley)


    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 the woocommerce_square_inventory_poll hook’s action should be set to WC_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?

    • This topic was modified 4 years, 11 months ago by ctrombley.
    • This topic was modified 4 years, 11 months ago by ctrombley.
    • This topic was modified 4 years, 11 months ago by ctrombley.
    • This topic was modified 4 years, 11 months ago by ctrombley.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support wpnomad a11n

    (@wpnomad)

    Hi @ctrombley ,

    This seems strange, I have just checked my test site setup that has WooCommerce 4.0.1 and Square for WooCommerce version 2.1.1 on it, and the hourly sync works fine on it.

    I recommend performing a conflict test on your site to check whether this might be due to a conflict from 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, i.e check the hourly sync.

    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.

    Hi there @ctrombley,

    Can you please advise if you’re still experiencing an issue with Square hourly sync?

    If yes, please contact us at WooCommerce.com > My Account > Tickets. You may need to create an account before you can access that page.

    Please include a link to this forum thread, so that we can keep track of what’s already been done.

    We will be able to help you further there.

    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WooCommerce Square auto-sync not working’ is closed to new replies.