Home › Forums › WoodMart support forum › Call to a member function get_total() on boolean
Call to a member function get_total() on boolean
- This topic has 11 replies, 2 voices, and was last updated 5 years, 5 months ago by
Artem Temos.
-
AuthorPosts
-
February 10, 2020 at 9:34 am #172473
[email protected]ParticipantHello,
I have weird case, In payment working fine when I am guest not login in,
however when I am login-ed in am getting this errorFatal error: Uncaught Error: Call to a member function get_total() on boolean in /home/customer/www/ .com/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-payment-gateway.php:263 Stack trace: #0 /home/customer/www/ .com/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-payment-gateway.php(281): WC_Payment_Gateway->get_order_total() #1 /home/customer/www/ .com/public_html/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(151): WC_Payment_Gateway->is_available() #2 /home/customer/www/ .com/public_html/wp-content/plugins/woocommerce/includes/wc-account-functions.php(118): WC_Payment_Gateways->get_available_payment_gateways() #3 /home/customer/www/ .com/public_html/wp-content/themes/woodmart/inc/integrations/woocommerce/template-tags.php(1525): wc_get_account_menu_items() #4 /home/customer/www/ .com/public_html/wp-content/themes/woodmart/inc/integrations/woocommerce/template-tags.php(1413): woodmart_get_my_acco in /home/customer/www/ .com/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-payment-gateway.php on line 263
I have trace the error till
woodmart/inc/integrations/woocommerce/template-tags.php
and 1412
this function. woodmart_get_my_account_menu() .
I have disable it, the checkout runs fine.However, can I disable this in checkout page only, or if there is any other suggested solution
February 10, 2020 at 10:48 am #172482
Artem TemosKeymasterHello,
Could you please disable all plugins that are not related to our theme and provide us your admin and FTP access so we can check it?
Thank you in advance
February 10, 2020 at 10:56 am #172485
[email protected]ParticipantHello,
Somehow related to this plugin WooCommerce MPGS ,
I have provided the accessFebruary 10, 2020 at 1:03 pm #172520
Artem TemosKeymasterHow did you trace the error to
woodmart_get_my_account_menu
? This function calls other functions as well. Maybe the error come from some function called fromwoodmart_get_my_account_menu
?Also, where exactly we can see the error on your website?
February 10, 2020 at 1:17 pm #172526
[email protected]ParticipantHi,
in Checkout Page.
try to checkout one of the product and you’ll see the error come outFebruary 10, 2020 at 1:38 pm #172531
Artem TemosKeymasterHow did you trace the error to woodmart_get_my_account_menu? This function calls other functions as well. Maybe the error come from some function called from woodmart_get_my_account_menu?
February 11, 2020 at 6:41 am #172646
[email protected]ParticipantHello,
from the error stack, you can see the last point is woodmart_get_my_account_menu,
as you see error moving from top till bottom, the bottom is woodmart_get_my_account_menu.Fatal error: Uncaught Error: Call to a member function get_total() on boolean in
/home/customer/www/ .com/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-payment-gateway.php:263 Stack trace: #0 /home/customer/www/ .com/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-payment-gateway.php(281): WC_Payment_Gateway->get_order_total() #1 /home/customer/www/ .com/public_html/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(151): WC_Payment_Gateway->is_available() #2 /home/customer/www/ .com/public_html/wp-content/plugins/woocommerce/includes/wc-account-functions.php(118): WC_Payment_Gateways->get_available_payment_gateways() #3 /home/customer/www/ .com/public_html/wp-content/themes/woodmart/inc/integrations/woocommerce/template-tags.php(1525): wc_get_account_menu_items() #4 /home/customer/www/ .com/public_html/wp-content/themes/woodmart/inc/integrations/woocommerce/template-tags.php(1413): woodmart_get_my_acco in /home/customer/www/ .com/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-payment-gateway.php on line 263
February 11, 2020 at 7:03 am #172649
Artem TemosKeymasterActually, that function is a top of the stack, not the bottom. It calls WooCommerce function
wc_get_account_menu_items
and it calls a few other core functions before the error appears. But it is not something wrong with the theme. It seems to be a conflict between your plugin and WooCommerce. And you see it with our theme because we call standard WooCommerce functions.February 11, 2020 at 7:09 am #172652
[email protected]ParticipantHello,
I have switched to Storefront theme and proceed to checkout the error didn’t showing up.
you have the access you can try in your endFebruary 11, 2020 at 8:23 am #172658
Artem TemosKeymasterYes, but it happens because Storefront doesn’t call
wc_get_account_menu_items
function in the header. You can try to remove my account menu from the header and check how it works with our theme. As I mentioned, it seems to be a conflict between your plugin and WooCommerce.February 11, 2020 at 8:32 am #172672
[email protected]Participantencase of removing it, the error dose not showing up,
however can I unset this function wc_get_account_menu_items in checkout page onlyFebruary 11, 2020 at 12:11 pm #172754
Artem TemosKeymasterYou can create a separate header and set this for the checkout page.
Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register