• Resolved vdnmanuel

    (@vdnmanuel)


    I get a fatal error on my woocommerce cart-page when the plugin ‘Conditional Payment Methods For WooCommerce’ is active. But I need this plugin on my checkout page. How can I fix this? Is this an error in the plugin itself? How can I get rid of it?

    Fatal error: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, bool given in /data/sites/web/ytabe/www/wp-content/plugins/conditional-payment-methods-for-woocommerce/includes/rules/class-wc-cpm-by-location.php:178 Stack trace: #0 /data/sites/web/ytabe/www/wp-content/plugins/conditional-payment-methods-for-woocommerce/includes/rules/class-wc-cpm-by-location.php(178): array_keys(false) #1 /data/sites/web/ytabe/www/wp-content/plugins/conditional-payment-methods-for-woocommerce/includes/class-wc-cpm-controller.php(177): WC_CPM_By_Location->validate(Array) #2 /data/sites/web/ytabe/www/wp-includes/class-wp-hook.php(310): WC_CPM_Controller->filter_payment_gateways(Array) #3 /data/sites/web/ytabe/www/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #4 /data/sites/web/ytabe/www/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(163): apply_filters(‘woocommerce_ava…’, Array) #5 /data/sites/web/ytabe/www/wp-content/plugins/woocommerce/includes/wc-template-functions.php(3921): WC_Payment_Gateways->get_available_payment_gateways() #6 /data/sites/web/ytabe/www/wp-includes/class-wp-hook.php(310): wc_get_pay_buttons(”) #7 /data/sites/web/ytabe/www/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(”, Array) #8 /data/sites/web/ytabe/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #9 /data/sites/web/ytabe/www/wp-content/plugins/woocommerce/templates/cart/cart-totals.php(107): do_action(‘woocommerce_pro…’) #10 /data/sites/web/ytabe/www/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/data/sites/web…’) #11 /data/sites/web/ytabe/www/wp-content/plugins/woocommerce/includes/wc-template-functions.php(2174): wc_get_template(‘cart/cart-total…’) #12 /data/sites/web/ytabe/www/wp-includes/class-wp-hook.php(310): woocommerce_cart_totals(”) #13 /data/sites/web/ytabe/www/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array) #14 /data/sites/web/ytabe/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #15 /data/sites/web/ytabe/www/wp-content/plugins/woocommerce/templates/cart/cart.php(191): do_action(‘woocommerce_car…’) #16 /data/sites/web/ytabe/www/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/data/sites/web…’) #17 /data/sites/web/ytabe/www/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php(99): wc_get_template(‘cart/cart.php’) #18 /data/sites/web/ytabe/www/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(72): WC_Shortcode_Cart::output(Array) #19 /data/sites/web/ytabe/www/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(85): WC_Shortcodes::shortcode_wrapper(Array) #20 /data/sites/web/ytabe/www/wp-includes/shortcodes.php(433): WC_Shortcodes::cart(”, ”, ‘woocommerce_car…’) #21 [internal function]: do_shortcode_tag(Array) #22 /data/sites/web/ytabe/www/wp-includes/shortcodes.php(273): preg_replace_callback(‘/\\[(\\[?)(woocom…’, ‘do_shortcode_ta…’, ‘[woocommerce_ca…’) #23 /data/sites/web/ytabe/www/wp-includes/class-wp-hook.php(310): do_shortcode(‘[woocommerce_ca…’) #24 /data/sites/web/ytabe/www/wp-includes/plugin.php(205): WP_Hook->apply_filters(‘[woocommerce_ca…’, Array) #25 /data/sites/web/ytabe/www/wp-includes/post-template.php(256): apply_filters(‘the_content’, ‘<!– wp:shortco…’) #26 /data/sites/web/ytabe/www/wp-content/themes/kpot-theme/page.php(13): the_content() #27 /data/sites/web/ytabe/www/wp-includes/template-loader.php(106): include(‘/data/sites/web…’) #28 /data/sites/web/ytabe/www/wp-blog-header.php(19): require_once(‘/data/sites/web…’) #29 /data/sites/web/ytabe/www/index.php(17): require(‘/data/sites/web…’) #30 {main} thrown in/data/sites/web/ytabe/www/wp-content/plugins/conditional-payment-methods-for-woocommerce/includes/rules/class-wc-cpm-by-location.php

Viewing 1 replies (of 1 total)
  • Plugin Support Hitendra Chopda

    (@hitendra-chopda)

    Hello @vdnmanuel

    Thank you for reaching out to us.

    In my opinion, you are using the plugin that has been closed for more than six years.

    Kindly verify the plugin’s author and version.

    Best Regards,
    Hitendra & Dotstore Team

Viewing 1 replies (of 1 total)
  • The topic ‘Error on cart due to Conditional Payment Methods For WooCommerce’ is closed to new replies.