Home Forums WoodMart support forum Call to a member function get_total() on boolean

Call to a member function get_total() on boolean

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #172473

    [email protected]
    Participant

    Hello,
    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 error

    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

    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

    #172482

    Artem Temos
    Keymaster

    Hello,

    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

    #172485

    [email protected]
    Participant

    Hello,
    Somehow related to this plugin WooCommerce MPGS ,
    I have provided the access

    #172520

    Artem Temos
    Keymaster

    How 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?

    Also, where exactly we can see the error on your website?

    #172526

    [email protected]
    Participant

    Hi,
    in Checkout Page.
    try to checkout one of the product and you’ll see the error come out

    #172531

    Artem Temos
    Keymaster

    How 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?

    #172646

    [email protected]
    Participant

    Hello,
    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

    #172649

    Artem Temos
    Keymaster

    Actually, 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.

    #172652

    [email protected]
    Participant

    Hello,
    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 end

    #172658

    Artem Temos
    Keymaster

    Yes, 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.

    #172672

    [email protected]
    Participant

    encase of removing it, the error dose not showing up,
    however can I unset this function wc_get_account_menu_items in checkout page only

    #172754

    Artem Temos
    Keymaster

    You can create a separate header and set this for the checkout page.

    Kind Regards

Viewing 12 posts - 1 through 12 (of 12 total)