• Resolved Robin

    (@robinrsa)


    Hi there

    We are currently experiencing the following issue on a site from the YOCO Payment Plugin:

    2024-06-11T13:42:39+00:00 CRITICAL Uncaught TypeError: Argument 1 passed to Yoco\Gateway\Checkout\Availability::disableIfInsecureConnection() must be of the type array, null given, called in /var/www/vb_prod/wp-includes/class-wp-hook.php on line 308 and defined in /var/www/vb_prod/wp-content/plugins/yoco-payment-gateway/src/Gateway/Checkout/Availability.php:21
    Stack trace:
    #0 /var/www/vb_prod/wp-includes/class-wp-hook.php(308): Yoco\Gateway\Checkout\Availability->disableIfInsecureConnection(NULL)
    #1 /var/www/vb_prod/wp-includes/plugin.php(205): WP_Hook->apply_filters(NULL, Array)
    #2 /var/www/vb_prod/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(163): apply_filters('woocommerce_ava...', Array)
    #3 /var/www/vb_prod/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Payments.php(93): WC_Payment_Gateways->get_available_payment_gateways()
    #4 /var/www/vb_prod/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Payments.php(71): Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks in /var/www/vb_prod/wp-content/plugins/yoco-payment-gateway/src/Gateway/Checkout/Availability.php on line 21

    WooCommerce Version: 7.5.1
    WordPress Version: 6.2.5

    Any suggestions or direction will be appreciated.

Viewing 1 replies (of 1 total)
  • Plugin Support Bartech

    (@bartech)

    Hello Robin,

    I’ve checked the the WooCommerce filter implementation, it expects an array as a parameter. I suspect there must be incorrect implementation for woocommerce_available_payment_gateways filter somewhere in your codebase (other plugins, theme, custom code) Filter should always return array but it’s returning nothing. Filters are applied in the order. Our filter runs after the faulty one and instead of getting proper type array it’s getting null value.

    You should search for the woocommerce_available_payment_gateways in you codebase and look for the method that have no return statement ot returns null.

    If needed I can assist in pinpointing where is the incorrect filter implementation placed. For this I would need access to your codebase where I can search for the filter use.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.