Fatal error Call to a member function get_status() on bool
-
Hi, Some users of our webshop get a fatal error, not everyone. I can’t replicate the error myself. I suspect one of the snippets we made, but we are not sure because we can’t replicate. Here are two examples of the Woocommerce status log, same error, different path:
2024-07-14T21:45:32+00:00 Kritiek Uncaught Error: Call to a member function get_cart() on null in /home/customer/www/mywebsite.nl/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(582) : eval()'d code:8?
Aanvullende context
{
??? "error": {
??????? "type": 1,
??????? "file": "/home/customer/www/mywebsite.nl/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(582) : eval()'d code",
??????? "line": 8
??? },
??? "backtrace": [
??????? "",
??????? "#0 /home/customer/www/mywebsite.nl/public_html/wp-includes/class-wp-hook.php(324): conditionally_hide_payment_gateways(Array)",
??????? "#1 /home/customer/www/mywebsite.nl/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)",
??????? "#2 /home/customer/www/mywebsite.nl/public_html/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(333): apply_filters('woocommerce_ava...', Array)",
??????? "#3 /home/customer/www/mywebsite.nl/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/WcPayWelcomePage.php(395): WC_Payment_Gateways->get_available_payment_gateways()",
??????? "#4 /home/customer/www/mywebsite.nl/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/WcPayWelcomePage.php(82): Automattic\WooCommerce\Internal\Admin\WcPayWelcomePage->get_incentive()",
??????? "#5 /home/customer/www/mywebsite.nl/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Notes/PaymentsMoreInfoNeeded.php(42): Automattic\WooCommerce\Internal\Admin\WcPayWelcomePage->must_be_visible()",
??????? "#6 /home/customer/www/mywebsite.nl/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Notes/PaymentsMoreInfoNeeded.php(63): Automattic\WooCommerce\Internal\Admin\Notes\PaymentsMoreInfoNeeded::should_display_note()",
??????? "#7 /home/customer/www/mywebsite.nl/public_html/wp-content/plugins/woocommerce/src/Admin/Notes/NoteTraits.php(83): Automattic\WooCommerce\Internal\Admin\Notes\PaymentsMoreInfoNeeded::get_note()",
??????? "#8 /home/customer/www/mywebsite.nl/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Events.php(203): Automattic\WooCommerce\Internal\Admin\Notes\PaymentsMoreInfoNeeded::possibly_add_note()",
??????? "#9 /home/customer/www/mywebsite.nl/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Events.php(143): Automattic\WooCommerce\Internal\Admin\Events->possibly_add_notes()",
??????? "#10 /home/customer/www/mywebsite.nl/public_html/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Internal\Admin\Events->do_wc_admin_daily()",
??????? "#11 /home/customer/www/mywebsite.nl/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)",
??????? "#12 /home/customer/www/mywebsite.nl/public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array)",
??????? "#13 /home/customer/www/mywebsite.nl/public_html/wp-cron.php(191): do_action_ref_array('wc_admin_daily', Array)",
??????? "#14 {main}",
??????? "thrown"
??? ]
}2024-07-15T18:19:44+00:00 Kritiek Uncaught Error: Call to a member function get_status() on bool in /home/customer/www/mywebsite.nl/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(582) : eval()'d code:3?
Aanvullende context
{
??? "error": {
??????? "type": 1,
??????? "file": "/home/customer/www/mywebsite.nl/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(582) : eval()'d code",
??????? "line": 3
??? },
??? "backtrace": [
??????? "",
??????? "#0 /home/customer/www/mywebsite.nl/public_html/wp-includes/class-wp-hook.php(324): change_received_order_text('Bedankt. Je bes...', false)",
??????? "#1 /home/customer/www/mywebsite.nl/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters('Bedankt. Je bes...', Array)",
??????? "#2 /home/customer/www/mywebsite.nl/public_html/wp-content/plugins/woocommerce/templates/checkout/order-received.php(34): apply_filters('woocommerce_tha...', 'Bedankt. Je bes...', false)",
??????? "#3 /home/customer/www/mywebsite.nl/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('/home/customer/...')",
??????? "#4 /home/customer/www/mywebsite.nl/public_html/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php(315): wc_get_template('checkout/order-...', Array)",
??????? "#5 /home/customer/www/mywebsite.nl/public_html/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php(65): WC_Shortcode_Checkout::order_received(4524)",
??????? "#6 /home/customer/www/mywebsite.nl/public_html/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(72): WC_Shortcode_Checkout::output(Array)",
??????? "#7 /home/customer/www/mywebsite.nl/public_html/wp-content/plugins/fluid-checkout/inc/checkout-page-template.php(139): WC_Shortcodes::shortcode_wrapper(Array, Array)",
??????? "#8 /home/customer/www/mywebsite.nl/public_html/wp-includes/shortcodes.php(433): FluidCheckout_CheckoutPageTemplate->output_checkout_shortcode_wrapper(Array, '', 'woocommerce_che...')",
??????? "#9 [internal function]: do_shortcode_tag(Array)",
??????? "#10 /home/customer/www/mywebsite.nl/public_html/wp-includes/shortcodes.php(273): preg_replace_callback('/\\[(\\[?)(wc_log...', 'do_shortcode_ta...', '[wc_login_form_...')",
??????? "#11 /home/customer/www/mywebsite.nl/public_html/wp-includes/class-wp-hook.php(324): do_shortcode('[wc_login_form_...')",
??????? "#12 /home/customer/www/mywebsite.nl/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters('[wc_login_form_...', Array)",
??????? "#13 /home/customer/www/mywebsite.nl/public_html/wp-includes/post-template.php(256): apply_filters('the_content', '
[wc_login_fo...')",
??????? "#14 /home/customer/www/mywebsite.nl/public_html/wp-content/themes/fields/includes/page-content.php(28): the_content()",
??????? "#15 /home/customer/www/mywebsite.nl/public_html/wp-content/themes/fields/page.php(18): include('/home/customer/...')",
??????? "#16 /home/customer/www/mywebsite.nl/public_html/wp-includes/template-loader.php(106): include('/home/customer/...')",
??????? "#17 /home/customer/www/mywebsite.nl/public_html/wp-blog-header.php(19): require_once('/home/customer/...')",
??????? "#18 /home/customer/www/mywebsite.nl/public_html/index.php(17): require('/home/customer/...')",
??????? "#19 {main}",
??????? "thrown"
??? ]
}The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.