Home Forums WoodMart support forum “Fatal error: Uncaught TypeError:” in checkout with Woo SmartCOD

“Fatal error: Uncaught TypeError:” in checkout with Woo SmartCOD

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #632359

    Chris Dev
    Participant

    Hi,

    I am using the latest WordPress (currently 6.7.1) and WooCommerce (currently 9.6.0) with the latest WooCommerce Smart COD (currently 1.7.2) but I get a fatal error in the checkout page. I have the latest WoodMart with all the patches applied. When I change the theme from WoodMart to Twenty-Five (also tested with Storefront) the fatal error does not occur and Woo SmartCOD works as expected.

    The error is the following:
    Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, false given in /home/www/my-domain/www/wp-content/plugins/wc-smart-cod/public/class-wc-smart-cod-public.php:77 Stack trace: #0 /home/www/my-domain/www/wp-content/plugins/wc-smart-cod/public/class-wc-smart-cod-public.php(251): Wc_Smart_Cod_Public->analyze_settings() #1 /home/www/my-domain/www/wp-content/plugins/wc-smart-cod/public/class-wc-smart-cod-public.php(968): Wc_Smart_Cod_Public->init_wsc_settings() #2 /home/www/my-domain/www/wp-includes/class-wp-hook.php(324): Wc_Smart_Cod_Public->apply_smart_cod_settings(Array) #3 /home/www/my-domain/www/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #4 /home/www/my-domain/www/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(336): apply_filters('woocommerce_ava...', Array) #5 /home/www/my-domain/www/wp-content/plugins/woocommerce/includes/wc-account-functions.php(125): WC_Payment_Gateways->get_available_payment_gateways() #6 /home/www/my-domain/www/wp-content/themes/woodmart/inc/integrations/woocommerce/template-tags.php(2154): wc_get_account_menu_items() #7 /home/www/my-domain/www/wp-content/themes/woodmart/inc/integrations/woocommerce/template-tags.php(2024): woodmart_get_my_account_menu() #8 /home/www/my-domain/www/wp-content/themes/woodmart/header-elements/account.php(7): woodmart_get_header_links(Array) #9 /home/www/my-domain/www/wp-content/themes/woodmart/inc/modules/header-builder/elements/abstract/class-element.php(77): require('/home/www/my-domain...') #10 /home/www/my-domain/www/wp-content/themes/woodmart/inc/modules/header-builder/class-frontend.php(210): XTS\Modules\Header_Builder\Element->render(Array, '') #11 /home/www/my-domain/www/wp-content/themes/woodmart/inc/modules/header-builder/class-frontend.php(198): XTS\Modules\Header_Builder\Frontend->render_element(Array) #12 /home/www/my-domain/www/wp-content/themes/woodmart/inc/modules/header-builder/class-frontend.php(198): XTS\Modules\Header_Builder\Frontend->render_element(Array) #13 /home/www/my-domain/www/wp-content/themes/woodmart/inc/modules/header-builder/class-frontend.php(198): XTS\Modules\Header_Builder\Frontend->render_element(Array) #14 /home/www/my-domain/www/wp-content/themes/woodmart/inc/modules/header-builder/class-frontend.php(149): XTS\Modules\Header_Builder\Frontend->render_element(Array) #15 /home/www/my-domain/www/wp-content/themes/woodmart/inc/modules/header-builder/functions.php(25): XTS\Modules\Header_Builder\Frontend->generate_header() #16 /home/www/my-domain/www/wp-content/themes/woodmart/header.php(26): whb_generate_header() #17 /home/www/my-domain/www/wp-includes/template.php(810): require_once('/home/www/my-domain...') #18 /home/www/my-domain/www/wp-includes/template.php(745): load_template('/home/www/my-domain...', true, Array) #19 /home/www/my-domain/www/wp-includes/general-template.php(48): locate_template(Array, true, true, Array) #20 /home/www/my-domain/www/wp-content/themes/woodmart/page.php(15): get_header() #21 /home/www/my-domain/www/wp-includes/template-loader.php(106): include('/home/www/my-domain...') #22 /home/www/my-domain/www/wp-blog-header.php(19): require_once('/home/www/my-domain...') #23 /home/www/my-domain/www/index.php(17): require('/home/www/my-domain...') #24 {main} thrown in /home/www/my-domain/www/wp-content/plugins/wc-smart-cod/public/class-wc-smart-cod-public.php on line 77

    Thanks in advance for any help!

    Regards,
    Chris

    • This topic was modified 1 year, 5 months ago by Chris Dev.
    #632477

    Aizaz Imtiaz Awan
    Keymaster
    Xtemos team

    Hello,

    Please deactivate all the 3rd party plugins and activate only theme-required plugins on the site and then check the issue. I am sure your issue will be solved. Then Activate the 3rd party plugins one by one and check which plugin is creating the issue for you.

    Otherwise, if the issue still exists then keep the 3rd party plugins deactivated and share the WP admin login details of your site so I will check and give you a possible solution.

    Best Regards

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