Fatal error on activation
-
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.phpbeing active. The WC Beta Tester or Jetpack Beta useswoocommerce-dev/woocommerce.phpand 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.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Fatal error on activation’ is closed to new replies.