Support » Plugin: WooCommerce Square » Manually Run Square –> WC Sync

  • Resolved ascottme


    Simple question: Is there a way to run the Square –> WC sync via cron job?

    Explanation why: My client manages all their products (donuts) through Square. They have 15-20 flavours, but only want 6 available through their website at a time. I set them up with an “Online” Location, and setup WooCommerce Square to only sync products available at that Location. Every few days they’re changing which flavours are available online. The hourly inventory sync does not recognize this change, but the manual sync does. The point of the Square-WooCommerce integration was so they didn’t have to login to WordPress at all and could manage everything through Square, which they use for their in-store POS system.

    I just need a way that the manual sync on the WooCommerce > Settings > Integration page can be run automatically, whether it’s a nightly cron job, or some other trigger.


    • This topic was modified 3 years, 8 months ago by ascottme.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Doug – a11n


    Automattic Happiness Engineer

    Hey there @ascottme

    Thanks for detailing this out, sorry for the delay in getting a reply to you!

    The hourly inventory sync does not recognize this change, but the manual sync does.

    This is correct behavior and we mention that in the Square extension documentation.

    I would imagine that setting up a cron for this should be possible but would need to confirm some details with the extension developers. I’ll reach out to them after the weekend to give you some starting points.

    To clarify, we’re unable to offer help with customization requests.


    Plugin Support Thomas Shellberg


    Automattic Happiness Engineer

    Hi @ascottme – If you take a look at the existing CRON job using something like WP Crontrol you can see the method that is run for inventory polling(check the screenshot below):

    In the same way, you should be able to run WC_Square_Sync_From_Square->sync_all_inventory() via a CRON job to manually sync the Square inventory from Square to WooCommerce.

    Hope that helps!

    Plugin Support melinda a11n


    Automattic Happiness Engineer

    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 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Manually Run Square –> WC Sync’ is closed to new replies.