• Resolved jjfc

    (@jjfc)


    Does this plugin support multisite?

    I am getting an error when activating the plugin
    “Plugin could not be activated because it triggered a fatal error. Woo Manage Fraud Orders depends on WooCommerce to work!”

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author prasidhda

    (@prasidhda)

    Hi @jjfc ,

    Do you have the “WooCommerce” plugin installed ? This plugin doesn’t work if your site doesn’t have “WooCommerce”.

    Thanks

    Plugin Contributor Brian Henry

    (@brianhenryie)

    It’s not good practice to trigger a fatal error (or to use die or exit).

    trigger_error() found. Debug code should not normally be used in production. (WordPress.PHP.DevelopmentFunctions.error_log_trigger_error)

    Imagine you’re troubleshooting a problem on a site. You disable all the plugins, address the cause of the problem and are about to re-enable all the plugins. So you select-all on the plugins screen, and choose enable. Any plugins that come alphabetically before WooCommerce will be activated before it. If they check for WooCommerce and trigger a fatal error, the process stops and no further plugins are activated, even though the user wanted to activate all their plugins including WooCommerce.

    I’ve had this happen on a live site and it just added to the stress of fixing the issue.

    So why do plugins do this check? It’s partly so WooCommerce’s functions (e.g. wc_get_order()) aren’t accessed when WooCommerce’s files have not been loaded. The correct way to get around this is to use WooCommerce’s hooks – i.e. you can safely infer that WooCommerce is loaded when your code is running on the ‘woocommerce_process_shop_order_meta’ hook!

    If a plugin wants to communicate to a user that a required plugin is missing, a much better way is to use an admin notice. Even then, I don’t think a plugin like this, with “Woo” in its name, really needs to tell the users they need WooCommerce!

    I’ll open a PR to remove this if it’s welcome.

    Plugin Author prasidhda

    (@prasidhda)

    Hi @jjfc ,

    You were right. There is issue with the plugin while trying to activate on the multisite.
    I will address that in the very next release.

    Thanks

    Plugin Author prasidhda

    (@prasidhda)

    Hi @jjfc ,

    This issue has been fixed in latest version 2.1.1.

    Many thanks for your bug report.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cannot Activate’ is closed to new replies.