I just did a quick check and this is a bug in WooCommerce itself. This is the offending code:
// Classes/actions loaded for the frontend and for ajax requests
if ( $this->is_request( 'frontend' ) ) {
// Session class, handles session data for users - can be overwritten if custom handler is needed
$session_class = apply_filters( 'woocommerce_session_handler', 'WC_Session_Handler' );
// Class instances
$this->session = new $session_class();
$this->cart = new WC_Cart(); // Cart class, stores the cart contents
$this->customer = new WC_Customer(); // Customer class, handles data such as customer location
}
In the file mentioned in the error message, here is what causes the error:
$menu_item = array(
'cart_url' => $woocommerce->cart->get_cart_url(),
'shop_page_url' => get_permalink( woocommerce_get_page_id( 'shop' ) ),
'cart_contents_count' => $woocommerce->cart->get_cart_contents_count(),
'cart_total' => strip_tags( $cart_contents_total ),
);
Your menu plugin is calling functions in WooCommerce that aren’t loaded in the admin panel. Whether it’s a bug in WooCommerce or the menu plugin can be decided between the authors of the two plugins. But it’s a bug in one of them, and that bug is causing the error encountered.
PS: So please check for the existence of the $woocommerce->cart class, and if it doesn’t exist, please create an instance.