Replies: 0
Hey,
I deactivated WooCommerce while this was active and other plugins were active. One of the other plugins tried to access a WooCommerce const and caused a fatal error. CTX Feed’s fatal error handler then tried to use wc_get_logger() which itself caused a fatal error!
Fatal error: Uncaught Error: Call to undefined function wc_get_logger() in /path/to/wp-content/plugins/webappick-product-feed-for-woocommerce/includes/log-helper.php:119
Stack trace:
#0 /path/to/wp-content/plugins/webappick-product-feed-for-woocommerce/includes/log-helper.php(139): woo_feed_log('woo-feed-fatal-...', 'Uncaught Error:...', 'critical', NULL, true, true)
#1 /path/to/wp-content/plugins/webappick-product-feed-for-woocommerce/includes/log-helper.php(64): woo_feed_log_fatal_error('Uncaught Error:...')
#2 [internal function]: woo_feed_log_errors_at_shutdown()
#3 {main} thrown in /path/to/wp-content/plugins/webappick-product-feed-for-woocommerce/includes/log-helper.php on line 119
I think replacing line 119 with:
if( function_exists( 'wc_get_logger' ) ) {
$loggers[] = wc_get_logger();
}
should be enough to prevent it.