• Resolved Brian Henry

    (@brianhenryie)


    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.

Viewing 1 replies (of 1 total)
  • Plugin Support ansarybadal

    (@ansarybadal)

    Hi @brianhenryie

    A new version of our plugin has been released. Please, update the plugin to its latest version to fix this issue and let us know if you are still having any further issues.

    Thank you,

    • This reply was modified 2 years, 4 months ago by ansarybadal.
Viewing 1 replies (of 1 total)
  • The topic ‘Fix: Fatal error / WooCommerce not active / wc_get_logger’ is closed to new replies.