Hi guys,
we get constant log entries with this error:
—
2019-10-23T11:46:24+00:00 CRITICAL Uncaught Error: Call to a member function get_cart() on null in /web/wp-content/themes/enfold/config-woocommerce/config.php:2009 Stack trace: #0 /web/wp-includes/class-wp-hook.php(286): avia_woocommerce_cart_pos(Array, Array, ‘html_’) #1 /web/wp-includes/plugin.php(208): WP_Hook->apply_filters(Array, Array) #2 /web/wp-content/themes/enfold/functions-enfold.php(1294): apply_filters(‘avf_header_clas…’, Array, Array, ‘html_’) #3 /web/wp-content/themes/aerobis/header.php(25): avia_header_class_string() #4 /web/wp-includes/template.php(722): require_once(‘/var/www/client…’) #5 /web/wp-includes/template.php(671): load_template(‘/var/www/client…’, true) #6 /web/wp-includes/general-template.php(41): locate_template(Array, true) #7 /web/wp-content/themes/e in /web/wp-content/themes/enfold/config-woocommerce/config.php on line 2009
—
Ideas?
Best,
El
Hey El,
Please add the code:
if (is_null($woocommerce->cart)) {
return '';
}
here
web/wp-content/themes/enfold/config-woocommerce/config.php:2009
Best regards,
Victoria