• Resolved room34

    (@room34)


    The plugin automatically deactivated after updating to version 2.4.0 due to a fatal error. When I manually try to activate it, it fails with this error:

    
    Fatal error: Uncaught TypeError: Argument 1 passed to mailchimp_as_push() must be an instance of Mailchimp_Woocommerce_Job, instance of __PHP_Incomplete_Class given, called in /…/wp-content/plugins/mailchimp-for-woocommerce/includes/class-mailchimp-woocommerce-activator.php on line 113 and defined in /…/wp-content/plugins/mailchimp-for-woocommerce/bootstrap.php:106
    Stack trace:
    #0 /…/wp-content/plugins/mailchimp-for-woocommerce/includes/class-mailchimp-woocommerce-activator.php(113): mailchimp_as_push(Object(__PHP_Incomplete_Class), 90)
    #1 /…/wp-content/plugins/mailchimp-for-woocommerce/includes/class-mailchimp-woocommerce-activator.php(27): MailChimp_WooCommerce_Activator::migrate_jobs()
    #2 /…/wp-content/plugins/mailchimp-for-woocommerce/bootstrap.php(529): MailChimp_WooCommerce_Activator::activate()
    #3 /…/wp-content/plugins/mailchimp-for-woocommerce/bootstrap.php on line 106
    

    The site is running WooCommerce 3.9.2 (not ready to upgrade to 4) with WordPress 5.4.1. I saw mention of Follow-Up Emails in another post. We are running that as well; I updated it to the latest version (4.9.1) but it didn’t help.

    In troubleshooting, I tried to roll this plugin back to the previous version (2.3.6) but attempting to activate it just caused MySQL to consume all available CPU for several minutes. I read elsewhere that this plugin attempts to re-sync all subscriptions from every single Woo order on activation? If so that’s very bad… this site has over 14,000 orders.

    Ideally I’d get this fatal error in 2.4.0 resolved, but I’d even settle for being able to roll back to 2.3.6 if I could get it to activate!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter room34

    (@room34)

    Follow-up on this. I poked around the plugin and determined the issue was coming up as the activation functionality was trying to migrate queued jobs from an old data table to new ones.

    I looked in my client’s database, and the wp_queue table had over 7700 rows in it, but they were all from several months ago, so I just decided to see what would happen if I deleted that table altogether.

    It still took several minutes, but after doing this I was able to get the plugin to activate. I’m not sure if those queued jobs were important or not, however. (I backed up the table before deleting it.)

    Plugin Author ryanhungate

    (@ryanhungate)

    @room34 hey thanks for reporting this – and more importantly upgrading your client’s plugin to the newest version. That means most likely that the store was in an broken state with Mailchimp – so deleting those jobs was a good thing. You can always just run the re-sync which I’m sure by now you’ve already done? If not, feel free to click the re-sync button because that may need to go back in history to push older data that might be missing.

    Let us know if you have any other questions!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can’t activate plugin due to fatal error’ is closed to new replies.