[Defender] WooCommerce, MultiStore, Defender :: not playing together nicely in multisite environme

The plugins that appear to be involved with this error are:
- WooCommerce 3.5
- WooMultistore
- WPMU Defender
and possibly:
- WPMU Hummingbird
- WooCommerce ShipStation (although, I'm now thinking that was their own issue for not offloading ShipStation upon WooCommerce upgrade/deactivation/reactivation)

The odd part is that everything appears to work, when the above plugins are deactivated/reactivated in various combinations.

I'm also going to copy/paste this entire ticket and share with WPMU. (copied from WooMultiStore support ticket submission)

I'm also going to include link to a screenshot of a WooCommerce table status error, that's showing missing tables.  This was submitted re: ShipStation plugin issue w/ WooCommerce 3.5 upgrade, but I thought I'd include it. It appears on all of the subsites, and I've never seen it before.
https://www.dropbox.com/s/dvo3751cr4bb2no/WooCommerce_MissingTables.jpg?dl=0
###

I upgraded to WooMultiStore v2 yesterday.  I was already on WooCommerce 3.5. 

here's a little background...

I was going to submit a support ticket last week, as I noticed that MultiStore was having a conflict with WPMU Defender.  It went away after I deactivated Defender, and I simply didn't have the time then to submit a support ticket then.  We haven't ever seen any issues due to Defender in the past, so this was very new.  (I'd also like to note, we use WPMU Cloner, for each starting store.  The only real reason why we Clone each store from a Vanilla setup, is so that we don't have to setup all of the WooCommerce settings for each new store we build.  This is the same practice that we've been using for a few years).

...everything appeared to be running correctly at that point.
###
skip ahead to a few days ago...

I initially had a fatal error upon upgrading to WooCommerce 3.5, due to the WooCommerce ShipStation plugin.  It appeared that was due to improper deactivation of the ShipStation plugin, because everything worked again after each store's tables were upgraded.  Everything was back up, all plugins were activated again, and no errors were being thrown.

I was editing a menu on the most recently cloned store.  When I deleted it, the following error was thrown.  I renamed the WooMultiStore folder (to deactivate), deactivated Defender, reactivated WooMultiStore... then, was able to enable Defender again, but this error was displayed on the page header (although, the plugin was activated network level).  There's the complete error info from the log down below.

Fatal error: Cannot declare class WP_Defender, because the name is already in use in /home/hilinemerch/public_html/multi/wp-content/plugins/wp-defender/wp-defender.php on line 16

### 

[30-Oct-2018 13:01:46 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_type() on boolean in /home/hilinemerch/public_html/multi/wp-content/plugins/woocommerce-multistore/include/class.admin.product.php:632

Stack trace:
#0 /home/hilinemerch/public_html/multi/wp-includes/class-wp-hook.php(286): WOO_MSTORE_admin_product->process_product_delete('171')
#1 /home/hilinemerch/public_html/multi/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#2 /home/hilinemerch/public_html/multi/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 /home/hilinemerch/public_html/multi/wp-includes/post.php(2590): do_action('before_delete_p...', '171')
#4 /home/hilinemerch/public_html/multi/wp-includes/nav-menu.php(262): wp_delete_post('171')
#5 /home/hilinemerch/public_html/multi/wp-admin/nav-menus.php(251): wp_delete_nav_menu(Object(WP_Term))
#6 {main}  thrown in /home/hilinemerch/public_html/multi/wp-content/plugins/woocommerce-multistore/include/class.admin.product.php on line 632

[30-Oct-2018 13:07:31 UTC] PHP Warning:  fopen(/home/hilinemerch/public_html/multi/wp-content/plugins/woocommerce-multistore/woocommerce-multistore.php): failed to open stream: No such file or directory in /home/hilinemerch/public_html/multi/wp-includes/functions.php on line 4848

[30-Oct-2018 13:07:31 UTC] PHP Warning:  fread() expects parameter 1 to be resource, boolean given in /home/hilinemerch/public_html/multi/wp-includes/functions.php on line 4851

[30-Oct-2018 13:07:31 UTC] PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /home/hilinemerch/public_html/multi/wp-includes/functions.php on line 4854

[30-Oct-2018 13:14:43 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/hilinemerch/public_html/multi/wp-includes/class.wp-scripts.php on line 426

[30-Oct-2018 13:15:03 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/hilinemerch/public_html/multi/wp-includes/class.wp-scripts.php on line 426

[30-Oct-2018 13:15:25 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/hilinemerch/public_html/multi/wp-includes/class.wp-scripts.php on line 426

[30-Oct-2018 13:15:44 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/hilinemerch/public_html/multi/wp-includes/class.wp-scripts.php on line 426

[30-Oct-2018 13:15:53 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/hilinemerch/public_html/multi/wp-includes/class.wp-scripts.php on line 426

[30-Oct-2018 13:21:00 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/hilinemerch/public_html/multi/wp-includes/class.wp-scripts.php on line 426

[30-Oct-2018 13:22:58 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_type() on boolean in /home/hilinemerch/public_html/multi/wp-content/plugins/woocommerce-multistore/include/class.admin.product.php:632

Stack trace:
#0 /home/hilinemerch/public_html/multi/wp-includes/class-wp-hook.php(286): WOO_MSTORE_admin_product->process_product_delete(7933)
#1 /home/hilinemerch/public_html/multi/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#2 /home/hilinemerch/public_html/multi/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 /home/hilinemerch/public_html/multi/wp-includes/post.php(2590): do_action('before_delete_p...', 7933)
#4 /home/hilinemerch/public_html/multi/wp-content/plugins/wp-hummingbird/core/modules/class-module-minify.php(1001): wp_delete_post(7933)
#5 /home/hilinemerch/public_html/multi/wp-content/plugins/wp-hummingbird/core/modules/class-module-minify.php(889): WP_Hummingbird_Module_Minify->clear_files()
#6 /home/hilinemerch/public_html/multi/wp-content/plugins/wp-hummingbird/admin/class-admin-n in /home/hilinemerch/public_html/multi/wp-content/plugins/woocommerce-multistore/include/class.admin.product.php on line 632

[30-Oct-2018 13:23:03 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/hilinemerch/public_html/multi/wp-includes/class.wp-scripts.php on line 426

[30-Oct-2018 13:23:11 UTC] PHP Fatal error:  Cannot declare class WP_Defender, because the name is already in use in /home/hilinemerch/public_html/multi/wp-content/plugins/wp-defender/wp-defender.php on line 16

[30-Oct-2018 13:23:11 UTC] PHP Fatal error:  Cannot declare class WP_Defender, because the name is already in use in /home/hilinemerch/public_html/multi/wp-content/plugins/wp-defender/wp-defender.php on line 16

[30-Oct-2018 13:24:22 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_type() on boolean in /home/hilinemerch/public_html/multi/wp-content/plugins/woocommerce-multistore/include/class.admin.product.php:632

Stack trace:
#0 /home/hilinemerch/public_html/multi/wp-includes/class-wp-hook.php(286): WOO_MSTORE_admin_product->process_product_delete(7933)
#1 /home/hilinemerch/public_html/multi/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#2 /home/hilinemerch/public_html/multi/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 /home/hilinemerch/public_html/multi/wp-includes/post.php(2590): do_action('before_delete_p...', 7933)
#4 /home/hilinemerch/public_html/multi/wp-content/plugins/wp-hummingbird/core/modules/class-module-minify.php(1001): wp_delete_post(7933)
#5 /home/hilinemerch/public_html/multi/wp-content/plugins/wp-hummingbird/core/modules/class-module-minify.php(889): WP_Hummingbird_Module_Minify->clear_files()
#6 /home/hilinemerch/public_html/multi/wp-content/plugins/wp-hummingbird/admin/class-admin-n in /home/hilinemerch/public_html/multi/wp-content/plugins/woocommerce-multistore/include/class.admin.product.php on line 632

[30-Oct-2018 13:24:29 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_type() on boolean in /home/hilinemerch/public_html/multi/wp-content/plugins/woocommerce-multistore/include/class.admin.product.php:632

Stack trace:
#0 /home/hilinemerch/public_html/multi/wp-includes/class-wp-hook.php(286): WOO_MSTORE_admin_product->process_product_delete(7933)
#1 /home/hilinemerch/public_html/multi/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#2 /home/hilinemerch/public_html/multi/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 /home/hilinemerch/public_html/multi/wp-includes/post.php(2590): do_action('before_delete_p...', 7933)
#4 /home/hilinemerch/public_html/multi/wp-content/plugins/wp-hummingbird/core/modules/class-module-minify.php(1001): wp_delete_post(7933)
#5 /home/hilinemerch/public_html/multi/wp-content/plugins/wp-hummingbird/core/modules/class-module-minify.php(889): WP_Hummingbird_Module_Minify->clear_files()
#6 /home/hilinemerch/public_html/multi/wp-content/plugins/wp-hummingbird/admin/class-admin-n in /home/hilinemerch/public_html/multi/wp-content/plugins/woocommerce-multistore/include/class.admin.product.php on line 632

[30-Oct-2018 13:24:41 UTC] PHP Warning:  fopen(/home/hilinemerch/public_html/multi/wp-content/plugins/wp-defender/wp-defender.php): failed to open stream: No such file or directory in /home/hilinemerch/public_html/multi/wp-includes/functions.php on line 4848

[30-Oct-2018 13:24:41 UTC] PHP Warning:  fread() expects parameter 1 to be resource, boolean given in /home/hilinemerch/public_html/multi/wp-includes/functions.php on line 4851

[30-Oct-2018 13:24:41 UTC] PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /home/hilinemerch/public_html/multi/wp-includes/functions.php on line 4854

[30-Oct-2018 13:24:41 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_type() on boolean in /home/hilinemerch/public_html/multi/wp-content/plugins/woocommerce-multistore/include/class.admin.product.php:632

Stack trace:
#0 /home/hilinemerch/public_html/multi/wp-includes/class-wp-hook.php(286): WOO_MSTORE_admin_product->process_product_delete(7933)
#1 /home/hilinemerch/public_html/multi/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#2 /home/hilinemerch/public_html/multi/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 /home/hilinemerch/public_html/multi/wp-includes/post.php(2590): do_action('before_delete_p...', 7933)
#4 /home/hilinemerch/public_html/multi/wp-content/plugins/wp-hummingbird/core/modules/class-module-minify.php(1001): wp_delete_post(7933)
#5 /home/hilinemerch/public_html/multi/wp-content/plugins/wp-hummingbird/core/modules/class-module-minify.php(889): WP_Hummingbird_Module_Minify->clear_files()
#6 /home/hilinemerch/public_html/multi/wp-content/plugins/wp-hummingbird/admin/class-admin-n in /home/hilinemerch/public_html/multi/wp-content/plugins/woocommerce-multistore/include/class.admin.product.php on line 632

###
The following is added to the error.log when Defender is re-activated on the Network level
###

[30-Oct-2018 13:24:46 UTC] PHP Warning:  fopen(/home/hilinemerch/public_html/multi/wp-content/plugins/wp-defender/wp-defender.php): failed to open stream: No such file or directory in /home/hilinemerch/public_html/multi/wp-includes/functions.php on line 4848

[30-Oct-2018 13:24:46 UTC] PHP Warning:  fread() expects parameter 1 to be resource, boolean given in /home/hilinemerch/public_html/multi/wp-includes/functions.php on line 4851

[30-Oct-2018 13:24:46 UTC] PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /home/hilinemerch/public_html/multi/wp-includes/functions.php on line 4854

[30-Oct-2018 13:24:46 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_type() on boolean in /home/hilinemerch/public_html/multi/wp-content/plugins/woocommerce-multistore/include/class.admin.product.php:632

Stack trace:
#0 /home/hilinemerch/public_html/multi/wp-includes/class-wp-hook.php(286): WOO_MSTORE_admin_product->process_product_delete(7933)
#1 /home/hilinemerch/public_html/multi/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#2 /home/hilinemerch/public_html/multi/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 /home/hilinemerch/public_html/multi/wp-includes/post.php(2590): do_action('before_delete_p...', 7933)
#4 /home/hilinemerch/public_html/multi/wp-content/plugins/wp-hummingbird/core/modules/class-module-minify.php(1001): wp_delete_post(7933)
#5 /home/hilinemerch/public_html/multi/wp-content/plugins/wp-hummingbird/core/modules/class-module-minify.php(889): WP_Hummingbird_Module_Minify->clear_files()
#6 /home/hilinemerch/public_html/multi/wp-content/plugins/wp-hummingbird/admin/class-admin-n in /home/hilinemerch/public_html/multi/wp-content/plugins/woocommerce-multistore/include/class.admin.product.php on line 632
  • splaquet
    • The Incredible Code Injector

    total side note, but something to share with the Support Ticket developer team...

    when I submitted the above ticket, the ` didn't turn the code lines into code, upon initial submission. I clicked edit, saved and then they appeared (without any other changes).

  • Huberson
    • Recruit

    Hello there,
    The "Table does not exist" is somehow an issue in Woocommerce. Tested with a fresh copy(3.5) network activated, the error is present even with basic settings.

    Regarding the other issue when editing menu, Fatal error from Defender and Multistore, it looks pretty much like a conflict or some unexpected value passed to some function.

    Beside the errors in Woo status, I wasn't able to replicate any of the other issue with WooCommerce 3.5, Defender, Hummingbird and WooCommerce ShipStation plugin.

    We'll need to replicate the same setup for further testing since I could test with WooMultistore. If possible you can create a staging clone of the network, and provide us with access to it with FTP or cpanel login. And also provide a zip copy of the involved plugins not available on WP.org.
    You can send those as follow via our contact form:

    Subject: "Attn: Huberson Dorvilus"
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)

    -link back to this thread for reference

    -any other relevant urls

    Regards,
    Huberson

  • Kasia Swiderska
    • Support nomad

    Hello splaquet,

    Different domain name would be best solution - however if you have separate domain of which you are not using subdomains you might be able to also create staging on subdomain.
    So main site would be subdomain.ofmyotherdomain.com and then sites would have urls like that: subsubdomain.subdomain.ofmyotherdomain.com - I have tested that solution once, it was working however I didn't have change to do more extensive tests.

    kind regards,
    Kasia

  • splaquet
    • The Incredible Code Injector

    My apologies on the delayed response. I still need to get this resolved, but I haven't had the time to. I'm wrapping up 2 major deadlines... they should be done this week.

    A few notes since last time:
    - WooMultiSite released an update, but I'm still receiving fatal errors with Hummingbird conflict
    - I was able to set up a sub-sub-domain site setup (guess that'll never live on WPMU's new hosting :stuck_out_tongue: )
    - Now I'm receiving errors from WooGlobalCart as well, so that's deactivated

    If it's a matter of sending you over (or giving you access) to my plugin set, I can either shoot you ftp credentials or a link to a zip file... or both.

    If you'll need a matched staging environment... That's going to take me until next week to revisit.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.