• Resolved depiction

    (@depiction)


    I recently installed this plugin for the first time on my site. I connected the plugin with Mailchimp. The Mailchimp for WordPress Overview page shows that the account and audience have been connected, a button to disconnect the store, and a status of “syncing…”

    None of the orders appears to have synced with Mailchimp. When I open the network tab in browser, I see a ping from /stats with the following response every 10 seconds or so.

    {"success":true,"promo_rules_in_store":3,"promo_rules_in_mailchimp":0,"products_in_store":26,"products_in_mailchimp":0,"orders_in_store":1517,"orders_in_mailchimp":0,"date":"Mon, Sep 7, 2020 5:34 PM","has_started":true,"has_finished":false}

    The value of “orders_in_mailchimp” never changes. My site is running PHP 7.4 and the latest version of WordPress and all plugins. I temporarily disabled Cloudflare caching and the iThemes Security plugin, thinking either of them might be causing a conflict, but that didn’t resolve the issue.

    The plugin’s Logs tab suggests that some orders have synced because the logs shows multiple lines of the following with different order ids.

    NOTICE debug :: Order ID 13338 was pending and is now processing :: Array
    NOTICE debug :: Order ID 13338 was processing and is now completed :: Array

    No errors appear in the logs.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author ryanhungate

    (@ryanhungate)

    @depiction can you please verify that your Action Scheduler jobs have been recently handled, or if there is a gap in the “completed jobs” at all? You should be able to see that recent jobs have been completed or failed, or are pending etc.

    We’ve heard from time to time that either the Action Scheduler is not working because of WP CRON not being turned on, or sometimes that there are other fatal errors preventing the scheduler from running its job tasks. You can find this in your WooCommerce -> Status -> Logs area but please make sure you’re looking at a RECENT date.

    Please take a look at the WooCommerce Action Scheduler tab to see if we’re in the right ballpark for the issues. Once you have that info, please report back so we can help troubleshoot the next steps.

    Thread Starter depiction

    (@depiction)

    @ryanhungate When I go to WooCommerce > Status, the System Status tab has a check mark by WP Cron. The action scheduler package is running version 3.1.6.

    The Scheduled Actions tab lists 102 pending actions.

    The logs tab doesn’t have any errors, only notices. For example:

    – NOTICE sync_store :: posting data
    – NOTICE mailchimp-woocommerce-sync.started :: Starting Sync
    – NOTICE action_scheduler.queue_job :: MailChimp_WooCommerce_Process_Coupons queued
    – NOTICE action_scheduler.queue_job :: MailChimp_WooCommerce_Single_Order starts
    – NOTICE debug :: Order ID XXXXX was pending and is now processing

    • This reply was modified 4 years, 6 months ago by depiction.
    Thread Starter depiction

    (@depiction)

    The WooCommerce status page says “Your server does not have the SoapClient class enabled”. Could that be the problem?

    Plugin Author ryanhungate

    (@ryanhungate)

    @depiction sorry for the delay on this one – but it just seems as if you’re not able to use the Action Scheduler for some reason. Typically that would be due to WP CRON not being turned on – or you might have some sort of FATAL error that we need to look at which can be found in your WooCommerce -> Logs area of the admin.

    Can you please check there to see if you’ve got anything recent that might be preventing the Action Scheduler from running? The fact the pending jobs exist tell me that everything should be working as expected from our plugin’s point of view, but something is getting in the way of those jobs actually firing.

    You can test this logic by “running manually” in the Action Scheduler’s pending jobs to see if it would process the Mailchimp jobs.

    Thread Starter depiction

    (@depiction)

    @ryanhungate When I go to WooCommerce > Status > Scheduled Actions, then click “Run” next to a pending action, the action successfully completes.

    As mentioned earlier, I don’t see any errors in any of the WooCommerce logs under WooCommerce Status. All of the messages in the logs include “NOTICE”, not “ERROR” or “FATAL”.

    I tried disabling all plugins except WooCommerce and Mailchimp for WooCommerce. I then went to WooCommerce > Mailchimp to let the sync run again. After a few minutes I checked the “stats” responses in the Network tab. The stats always includes the same response with success equalling true, indicating that no progress is being made and that there were no errors.

    {"success":true,"promo_rules_in_store":6,"promo_rules_in_mailchimp":4,"products_in_store":26,"products_in_mailchimp":20,"orders_in_store":1563,"orders_in_mailchimp":0,"date":"Mon, Sep 21, 2020 9:58 PM","has_started":true,"has_finished":false}

    Plugin Author ryanhungate

    (@ryanhungate)

    @depiction this feels as if something is still getting hung up with the Action Scheduler not actually processing jobs. If you’re able to run one manually, that means the scheduler will do the work, but now we have to make sure you’ve enabled it if you have something preventing them from processing.

    Are there any other jobs being set as pending which are above the Mailchimp entities? Who is your web host, and have you been able to verify that the WP CRON is indeed working in other areas of your install?

    If you have command line access and the ability to run the Action Scheduler in the CLI mode, that’s recommended too.

    Thread Starter depiction

    (@depiction)

    @ryanhungate I use a WordPress specific host (WPX Hosting), so I don’t have shell access to run Action Scheduler in CLI mode.

    I installed the WP Crontrol plugin, thinking that it might help. After enabling it, the cron schedules page showed the following:

    “There was a problem spawning a call to the WP-Cron system on your site. This means WP-Cron events on your site may not work. The problem was:
    Unexpected HTTP response code: 404”

    The wp-cron.php file existed in the root directory, so I was confused why it’d think it didn’t exist. My host couldn’t figure it out either.

    I ended up adding the following to wp-config.php to enable the alternate cron feature.

    define('ALTERNATE_WP_CRON', true);

    Orders now sync with Mailchimp.

    Plugin Support khungate

    (@khungate)

    Glad to hear that fixed the issue @depiction! If anything else pops up, don’t hesitate to reach back out to us. We really appreciate you using the plugin. If it’s working well for you and your business, please consider leaving us a positive review.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Plugin not syncing with Mailchimp’ is closed to new replies.