• Resolved Web Expert

    (@seldimi)


    Some of us prefer to have WooCommerce Admin disabled with a plain filter
    add_filter( ‘woocommerce_admin_disabled’, ‘__return_true’ );

    If so, Mailchimp breaks the whole admin. Please can you add an if statement if WC is active or not

    error: Uncaught Exception: Invalid data storage.
    in /home/www/webex7/ioannidiseleven.gr/www/wp-content/plugins/woocommerce/includes/class-wc-data-store.php on line 107

    Call stack:

    WC_Data_Store::__construct()
    wp-content/plugins/woocommerce/includes/class-wc-data-store.php:139
    WC_Data_Store::load()
    wp-content/plugins/mailchimp-for-woocommerce/admin/class-mailchimp-woocommerce-admin.php:283
    MailChimp_WooCommerce_Admin::initial_notice()
    wp-includes/class-wp-hook.php:287
    WP_Hook::apply_filters()
    wp-includes/class-wp-hook.php:311
    WP_Hook::do_action()
    wp-includes/plugin.php:478
    do_action()
    wp-admin/admin-header.php:292
    require_once()
    wp-admin/index.php:111

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

    (@ryanhungate)

    @seldimi can you please confirm that you’re on version 2.4.6 of the plugin? This specific error you’re bringing up should be muted and resolved but we’ve never tested our plugin while not using the admin – as this is meant to be used IN the plugin admin.

    Let us know if the update does the trick.

    Thread Starter Web Expert

    (@seldimi)

    Yes, its version 2.4.6

    I didn’t say I have disabled WordPress admin (i’m not doing headless WP) but WooCommerce Admin. Many web shop do not require all these extra information but still wanna use mailchimp ??

    Plugin Author ryanhungate

    (@ryanhungate)

    @seldimi just wanted to follow up with you on this one – we will patch this early next week after we’ve had a chance to QA that issue. I’m taking a guess that you’ve already commented out the code causing the problem as a temporary patch?

    Plugin Support khungate

    (@khungate)

    Hi @seldimi, we were able to patch this issue in the latest version of the plugin (v2.4.7). We appreciate you bringing this to our attention and patience while we got it resolved. Don’t hesitate to reach back out if you need anything else.

    This is still an issue for me. We use “Disable WooCommerce Bloat” plugin to disable a multitude of unnecessary WooCommerce functions. I’m getting this error when trying to activate Mailchimp for WooCommerce:

    2020-11-06T15:26:24+00:00 CRITICAL Uncaught Exception: Invalid data store. in /wp-content/plugins/woocommerce/includes/class-wc-data-store.php:107
    Stack trace:
    #0 /wp-content/plugins/woocommerce/includes/class-wc-data-store.php(139): WC_Data_Store->__construct('admin')
    #1 /wp-content/plugins/mailchimp-for-woocommerce/admin/class-mailchimp-woocommerce-admin.php(283): WC_Data_Store::load('admin-note')
    #2 /wp-includes/class-wp-hook.php(287): MailChimp_WooCommerce_Admin->initial_notice('')
    #3 /wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #4 /wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #5 /wp-admin/admin-header.php(292): do_action('admin_notices')
    #6 /wp-admin/admin.php(239): require_once('/home/lam09sbcn...')
    #7 {main}
      thrown in /wp-content/plugins/woocommerce/includes/class-wc-data-store.php on line 107
    Thread Starter Web Expert

    (@seldimi)

    Yup, its still an issue, or re-appeared

    Plugin Author ryanhungate

    (@ryanhungate)

    @seldimi @treebranchmedia yes – we resolved ONE issue last version – but we have this current fix in our next release and has been tested exactly as you described. That release schedule is not in stone yet but it’s right around the next bend so when that gets closer, we’ll ping you here. For right now your best bet is to just comment out that code manually where the initial_notice function is firing if you’re disabling the admin.

    Which file, which lines should I be commenting out?

    Update: I commented out lines 259-324 in mailchimp-for-woocommerce/admin/class-mailchimp-woocommerce-admin.php
    Seems to have worked

    Plugin Author ryanhungate

    (@ryanhungate)

    in in this function just return null on the first line and it will skip the code ?? Sorry about not saying that before.

    Just reporting in to say we’re experiencing this issue… we’re using this plugin: https://github.com/lukecav/performance-improvements-for-woocommerce to disable parts of WC Admin (mostly the UI) since it’s a bit bloated especially for really large, managed stores. I’ll be looking for a more permeant workaround this week.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Fatal error when WC Admin is disabled’ is closed to new replies.