Fatal error get_cart_contents
-
Our error log fills upp with this in a Breakdance enabled site where carts not always available in the site.
[16-Jan-2026 11:59:48 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_cart_contents() on null in //wp-content/plugins/yaycurrency/includes/Helpers/SupportHelper.php:263
Stack trace: 0 //wp-content/plugins/yaycurrency/includes/Engine/Hooks.php(127): Yay_Currency\Helpers\SupportHelper::get_cart_subtotal_default() 1 //wp-includes/class-wp-hook.php(341): Yay_Currency\Engine\Hooks->calculate_cart_subtotal_default(0) 2 //wp-includes/plugin.php(205): WP_Hook->apply_filters(0, Array) 3 //wp-content/plugins/yaycurrency/includes/Engine/FEPages/WooCommerceCurrency.php(137): apply_filters(‘YayCurrency/Sto…’, 0) 4 //wp-includes/class-wp-hook.php(341): Yay_Currency\Engine\FEPages\WooCommerceCurrency->enqueue_scripts(”) 5 //wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) 6 //wp-includes/plugin.php(522): WP_Hook->do_action(Array) 7 //wp-includes/script-loader.php(2311): do_action(‘wp_enqueue_scri…’) 8 //wp-includes/class-wp-hook.php(341): wp_enqueue_scripts(”) 9 //wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) 10 //wp-includes/plugin.php(522): WP_Hook->do_action(Array) 11 //wp-includes/general-template.php(3197): do_action(‘wp_head’) 12 //wp-content/plugins/breakdance/plugin/themeless/util.php(23): wp_head() 13 //wp-content/plugins/breakdance/plugin/themeless/theme-simulator/breakdance-no-template.php(28): Breakdance\Themeless\outputHeadHtml() 14 //wp-content/plugins/breakdance/plugin/render/capture-wordpress-output.php(94): include(‘//…’) 15 //wp-content/plugins/breakdance/plugin/render/capture-wordpress-output.php(75): Breakdance\Render\getWordPressHtmlOutput(‘//…’) 16 //wp-content/plugins/breakdance/plugin/actions_filters/template_include.php(61): Breakdance\Render\getWordPressHtmlOutputWithHeaderAndFooterDependenciesAddedAndDisplayIt(‘//…’) 17 //wp-includes/class-wp-hook.php(341): Breakdance\ActionsFilters\template_include(‘//…’) 18 //wp-includes/plugin.php(205): WP_Hook->apply_filters(‘/…’, Array) 19 //wp-includes/template-loader.php(114): apply_filters(‘template_includ…’, ‘//…’) 20 //wp-blog-header.php(19): require_once(‘//…’) 21 //index.php(17): require(‘//…’) 22 {main}thrown in //wp-content/plugins/yaycurrency/includes/Helpers/SupportHelper.php on line 263
You must be logged in to reply to this topic.