Installed Mailchimp for WooCommerce and Your Store Analytics Stopped Syncing?

Good news: it's not a plugin conflict, but you may have to look at how your crons are running.

I work at an agency where most of our clients use WordPress on their websites, and many run an online store using WooCommerce.  One of our clients, a coffee roastery in Texas, had decided to increase customer engagement using email campaigns.  We configured their contact form to work with Mailchimp, and then installed Mailchimp for WooCommerce.  This was on a Thursday.

Come Monday morning, one of our team reported a bug with WooCommerce Analytics on the client’s website.  WooCommerce Analytics was showing no orders starting Friday morning.  Switching to the Orders tab in WooCommerce, we could see that lots of orders were coming in a daily basis.  What was happening?  

The debug logs did not turn up any issues at all and everything else seemed to be fine.  Time to do some Googling. I typed in a description of what was happening and hoped I would find  a solution from someone else who had experienced it.  

The search results returned that matched the issue were sparse.  But there was one that shed considerable light on what might be happening

In our case, the problem was that the only cron running on the website was WP-Cron, and it only runs when someone is using the website.  When we installed Mailchimp for WooCommerce, it started syncing all of the past orders on the website, which number close to 23,000.  Until all of the orders synced to Mailchimp, the site wouldn’t be able to sync any new orders or process customer subscriptions.  This was a problem.  

The client had a dedicated server with cPanel, so our solution was to set up a cPanel cron to run WP-Cron.  At the same time, we added this line to the wp-config.php:

					define('DISABLE_WP_CRON', true);

Once we did that and checked the Scheduled Actions tab in WooCommerce, we saw all of the requests that were scheduled to run.

It took a couple of days for all of the orders to be synced into Mailchimp, but eventually the order analytics showed up.  Everything ran as expected after that.

Interview with Apetech

Interview with Alex from ApeTech Tutorials Watch as Robert is interviewed by Alex Ortiz of ApeTech Tutorials.  This is

Read More »