• Resolved bexmarie

    (@bexmarie)


    Received an email: “WordPress caught an error with one of your plugins, WooCommerce Payments.”

    Website LOOKS okay when I view at first glance.
    >> What could have caused this? (I recently updated plugins, not sure if thats why?)
    >> Do I need to worry about this or do anything?

    Error Details
    =============
    An error of type E_ERROR was caused in line 54 of the file /var/www/wp-content/plugins/woocommerce-payments/includes/admin/class-wc-rest-payments-orders-controller.php. Error message: Uncaught ArgumentCountError: Too few arguments to function WC_REST_Payments_Orders_Controller::__construct(), 3 passed in /var/www/wp-content/plugins/woocommerce-payments/includes/class-wc-payments.php on line 592 and exactly 4 expected in /var/www/wp-content/plugins/woocommerce-payments/includes/admin/class-wc-rest-payments-orders-controller.php:54
    Stack trace:
    #0 /var/www/wp-content/plugins/woocommerce-payments/includes/class-wc-payments.php(592): WC_REST_Payments_Orders_Controller->__construct(Object(WC_Payments_API_Client), Object(WCPay\Payment_Methods\CC_Payment_Gateway), Object(WC_Payments_Customer_Service))
    #1 /var/www/wp-includes/class-wp-hook.php(307): WC_Payments::init_rest_api(Object(WP_REST_Server))
    #2 /var/www/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #3 /var/www/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
    #4 /var/www/wp-includes/rest-api.php(553): do_action(‘rest_api_init’, Object(WP_REST_Server))
    #5 /var/www/wp-includes/rest-api.php(511): rest_get_server`

    Site info
    ==========
    WordPress version 5.9.2
    PHP version 7.3.30
    Theme: Beaver Builder
    WooCommerce Payments (version 3.8.2)
    Other Plugins installed:
    AIO SEO, Beaver Builder, Beaver Themer, CF7, Google Listings and Ads, Jetpack, Smash Balloon IG Feed, Sucuri, Woo 6.2.2, WooCommerce Shipping & Tax, WooCommercce Weight based shipping, and WP101 Video Tutorials

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey @bexmarie,

    Thanks for reaching out. Sometimes these emails are triggered when an update is taking place. For a brief moment, part of the site’s code isn’t available and that causes a problem that triggers an error like this.

    If this was my site, I would take a look around and make sure that everything is working. Try making a purchase and see if there aren’t any problems.

    You can also go to WooCommerce > Status > Logs and use the drop-down in the top-right to select any “fatal error” logs that you see. If you see this error continuing to occur in the logs, that would indicate this is an ongoing issue.

    Let us know what you find out or if you have any questions.

    Cheers

    Thread Starter bexmarie

    (@bexmarie)

    Thanks for the reply. This particular fatal error has not recurred at all so I guess then it was just a fluke and nothing to worry about?

    But today I ran plugin updates again and got this one (slightly different)

    CRITICAL Uncaught TypeError: Argument 2 passed to WC_REST_Payments_Webhook_Controller::__construct() must be an instance of WC_Payments_Webhook_Processing_Service, instance of WC_Payments_DB given, called in /var/www/wp-content/plugins/woocommerce-payments/includes/class-wc-payments.php on line 615 and defined in /var/www/wp-content/plugins/woocommerce-payments/includes/admin/class-wc-rest-payments-webhook-controller.php:46
    Stack trace:
    #0 /var/www/wp-content/plugins/woocommerce-payments/includes/class-wc-payments.php(615): WC_REST_Payments_Webhook_Controller->__construct(Object(WC_Payments_API_Client), Object(WC_Payments_DB), Object(WC_Payments_Account), Object(WC_Payments_Remote_Note_Service), Object(WC_Payments_Order_Service))
    #1 /var/www/wp-includes/class-wp-hook.php(307): WC_Payments::init_rest_api(Object(WP_REST_Server))
    #2 /var/www/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #3 /var/www/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
    #4 /var/www/wp-includes/rest-api.php(553):  in /var/www/wp-content/plugins/woocommerce-payments/includes/admin/class-wc-rest-payments-webhook-controller.php on line 46
    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Was this error also emailed during updates? Most of the time if you get an email about a critical error during an update and the updates finish without issue, you can safely ignore them.

    As always, it’s good to make sure your site works as expected after updating. If you do spot any trouble, let us know.

    Thread Starter bexmarie

    (@bexmarie)

    Ok thank you. Yes it was during updates. I just know when I pass this site off to my client, this will be alarming for her so I wanted to be sure everything is fine and I’ve done my best before handing it over.

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hi @bexmarie,

    I can completely understand the concern. You might mention to her that she may get an error notice during updates but that it’s not typically something to be concerned about. I know from my own sites that I’ll go through periods where I get errors like this with most updates and then it’ll be a year before it happens again.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal Error (too few arguments)’ is closed to new replies.