Uncaught Error: Call to a member function get_cart_total() on null

Suddenly seeing this error in Woocommerce logs after update from WC 5.6.4. to 3.6.5, X theme 6.5.5 and ubermenu (installled via X theme) 3.6.0.1.

2019-09-18T10:49:09+00:00 CRITICAL Uncaught Error: Call to a member function get_cart_total() on null in /site/wp-content/themes/x/framework/functions/plugins/woocommerce.php:393
Stack trace:
#0 /site/wp-content/themes/x/framework/functions/plugins/woocommerce.php(447): x_woocommerce_navbar_cart()
#1 /site/wp-includes/class-wp-hook.php(286): x_woocommerce_navbar_menu_item('<li id="menu-it...', Object(stdClass))
#2 /site/wp-includes/plugin.php(208): WP_Hook->apply_filters('<li id="menu-it...', Array)
#3 /site/wp-includes/nav-menu-template.php(243): apply_filters('wp_nav_menu_ite...', '<li id="menu-it...', Object(stdClass))
#4 /site/wp-content/plugins/ubermenu/includes/ubermenu.api.php(5): wp_nav_menu(Object(stdClass))
#5 /site/wp-content/themes/x/framework/legacy/cranium/headers/views/global/_nav-primary.php(10): ubermenu('main', Array)
#6 /site/wp-content/themes/x/framework/functions/frontend/view-routing.php(182): include('/si...')
#7 / in /site/wp-content/themes/x/framework/functions/plugins/woocommerce.php on line 393

Any idea? Not really sure what happens on the user side.

Hey @mrboats,

I could not replicate his error using the latest version of X and Cornerstone and the latest supported version of WooCommerce and UberMenu.

Would you mind providing us your site’s WordPress Login URL, Username and Password and FTP credentials in a Secure Note. Also provide us with the page URL where this issue is happening.

Thanks.

This is on the production site, so unfortunately not able to let you guys in. I also cannot replicate on staging.

From the stack trace, can you determine what the user might be doing at this point, to find what needs to be tested/debugged?

What would you consider the latest supported version for ubermenu?

Hello @MrBoats,

Thanks for writing in! UberMenu 3.6.0.1 is supported in the theme. To find more about all the supported version in X 6.5.5, you can check it here:

I noticed that you have Cache Enabler in your Production site. Try to clear the cache and test it again. And if WC 3.6.5 is giving you issues, you may need to update it to WC 3.7 because I am not seeing any issues on my local testing server here.

Hope this helps. Please let us know how it goes.

OK, I’m on WC 3.6.5. because I was under the impression that WC 3.7 is not yet supported by X? So X has been tested with 3.7? For 3.6, I needed to edit one template, is 3.7 fully compatible or is there something needed in terms of (minor) edits to support WC 3.7?

Still wondering, what user/customer interaction would result in this because the error is rather sprious?

Hey @mrboats,

I’m sorry I should have explicitly said that you try the latest version of X and Cornerstone. You’re not using the latest version. You can see the latest version at https://theme.co/apex/forum/t/troubleshooting-version-compatibility/195.

This is not an issue with our products because I could not replicate it in any of my test sites. You also have proven that when you said you also could not replicate in your own staging site.

This only means that there’s a problem with the way how you or your system update WordPress, themes and plugins. This is outside our products’ control. The most I could recommend in this case is you re-install WordPress, X, WooCommerce and UberMenu.

Though I also have tested WC 3.7 in my test site and encountered no issues, it’s still not officially supported.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.