• Hi there!

    I am using a development version of WooCommerce to test things and I get a fatal error whenever I try to activate the Billie extension.

    The root cause of this is you gating almost all the initialization (but not all – the WC Blocks integration still hooks in and throws an Exception) on woocommerce/woocommerce.php being active. The WC Beta Tester or Jetpack Beta uses woocommerce-dev/woocommerce.php and the Billie extension fails to determine that WC is active.

    I think a safer way to gate your initialization is to check for the WooCommerce class, like this:

    add_action( 'plugins_loaded', function () {
    if ( ! class_exists( 'WooCommerce' ) ) {
    return;
    }

    $billie_plugin = new Plugin();
    $billie_plugin->init();
    }, 11 ); // Use priority 11 so WooCommerce has a chance to load everything at 10.

    Looking forward to your reply.

    • This topic was modified 1 year, 2 months ago by vlad.olaru.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Fatal error on activation’ is closed to new replies.