Uncaught ArgumentCountError: Too few arguments to fu
-
Hi,
The last couple of times when an update of the plugin has run I get a mail from my wordpress install that the site encounters a technical issue.
Amongst more details it is starting with this:
It says there is an E_error on line 24 ot the RestApi.php file in mollie-payments-for-woocommerce -> src -> Payment -> Webhooks. Error message: Uncaught ArgumentCountError: Too few arguments to function.
What’s wrong and what to do about it. The site shows fine. I only don’t know if a check out operation will be carried out….
please advice.
I hope to hear soon.
Best regards,
AdriThe page I need help with: [log in to see the link]
-
I have exactly the same problem. So this is clearly a bug. Please make a new version without this problem, Mollie.
Een fout van het type E_ERROR werd veroorzaakt op regelnummer 24 van het bestand /var/www/vhosts/domein.nl/httpdocs/wp-content/plugins/mollie-payments-for-woocommerce/src/Payment/Webhooks/RestApi.php. Foutmelding: Uncaught ArgumentCountError: Too few arguments to function Mollie\WooCommerce\Payment\Webhooks\RestApi::__construct(), 2 passed in /var/www/vhosts/domein.nl/httpdocs/wp-content/plugins/mollie-payments-for-woocommerce/src/Payment/inc/services.php on line 120 and exactly 3 expected in /var/www/vhosts/domein.nl/httpdocs/wp-content/plugins/mollie-payments-for-woocommerce/src/Payment/Webhooks/RestApi.php:24only got it this time, but error after this update indeed.
I do certainly hope that Mollie will create a bug free version.
What gives me a little bit peace of mind is that I just received an order and the payment was received without issues.
Cheers!I encountered the same fatal error right after upgrading to version 8.1.3
I have WP 6.8.3 with WooCommerce 10.4.3 and WooCommerce Subscriptions 8.3.1.
[19-Jan-2026 18:20:55 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Mollie\WooCommerce\Payment\Webhooks\RestApi::__construct(), 2 passed in /home/mysite/public_html/wp-content/plugins/mollie-payments-for-woocommerce/src/Payment/inc/services.php on line 120 and exactly 3 expected in /home/mysite/public_html/wp-content/plugins/mollie-payments-for-woocommerce/src/Payment/Webhooks/RestApi.php:24
Stack trace: 0 /home/mysite/public_html/wp-content/plugins/mollie-payments-for-woocommerce/src/Payment/inc/services.php(120): Mollie\WooCommerce\Payment\Webhooks\RestApi->__construct() 1 /home/mysite/public_html/wp-content/plugins/mollie-payments-for-woocommerce/vendor/inpsyde/modularity/src/Container/ReadOnlyContainer.php(46): Mollie\WooCommerce\Payment\PaymentModule::Mollie{closure}() 2 /home/mysite/public_html/wp-content/plugins/mollie-payments-for-woocommerce/src/Payment/PaymentModule.php(73): Mollie\Inpsyde\Modularity\Container\ReadOnlyContainer->get() 3 /home/mysite/public_html/wp-includes/class-wp-hook.php(324): Mollie\WooCommerce\Payment\PaymentModule->Mollie\WooCommerce\Payment{closure}() 4 /home/mysite/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 5 /home/mysite/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() 6 /home/mysite/public_html/wp-includes/rest-api.php(628): do_action() 7 /home/mysite/public_html/wp-includes/rest-api.php(586): rest_get_server() 8 /home/mysite/public_html/wp-includes/rest-api.php(2973): rest_do_request() 9 [internal function]: rest_preload_api_request() 10 /home/mysite/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Settings.php(150): array_reduce() 11 /home/mysite/public_html/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Internal\Admin\Settings->add_component_settings() 12 /home/mysite/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters() 13 /home/mysite/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/WCAdminSharedSettings.php(73): apply_filters() 14 /home/mysite/public_html/wp-content/plugins/woocommerce/src/Blocks/Assets/AssetDataRegistry.php(274): Automattic\WooCommerce\Internal\Admin\WCAdminSharedSettings->Automattic\WooCommerce\Internal\Admin{closure}() 15 /home/mysite/public_html/wp-content/plugins/woocommerce/src/Blocks/Assets/AssetDataRegistry.php(390): Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->execute_lazy_data() 16 /home/mysite/public_html/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->enqueue_asset_data() 17 /home/mysite/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 18 /home/mysite/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() 19 /home/mysite/public_html/wp-admin/includes/template.php(2228): do_action() 20 /home/mysite/public_html/wp-admin/update.php(53): iframe_footer() 21 {main}thrown in /home/mysite/public_html/wp-content/plugins/mollie-payments-for-woocommerce/src/Payment/Webhooks/RestApi.php on line 24
Hi
Thank you for reporting this issue.
I have reported this to the development team, and they are currently investigating.
While we work on a permanent solution, we recommend downgrading to the previous version, which shouldn’t have this issue.
We apologize for the inconvenience and appreciate your patience. We’ll release a fix as soon as possible.
Regards,
Femi.Hello
To help us confirm whether this issue is influenced by your site setup and to rule out any environment-specific factors, could you please share your System Status Report?
You can find this under WooCommerce → Status. Please copy and paste the full report into your reply.
You can share the system status report by pasting it here https://privatebin.syde.com/, and sharing the link.
Thank you.
Hey Femi,
I pasted it here: https://privatebin.syde.com/?b4c31b88d4348a19#HT8bVv8f9BUbSVaW6zRTSVNorekG6P1nHpetM7HqRkuj
Good luck with it.
Cheers!I also got the error.
-
This reply was modified 3 weeks, 2 days ago by
matthijswink.
Thank you @adri-oosterwijk
Could you please also share the error debug logs?
We would like to compare the lopgs to confirm if the same error is logged for all.
Please check the error logs by enabling WordPress debug logging (if it isn’t already enabled), then reproduce the issue or re-run the plugin update. After that, review the file at wp-content/debug.log and share the specific error message shown there.
Thank you.
Hi all,
Thank you for your cooperation.
As we continue investigating this issue, please provide the following details to help us better understand the situation:
- Full Mollie logs (shared via PrivateBin) and the WooCommerce system status report (if not already provided)
- Please test the webhooks. Navigate to WooCommerce Settings>Mollie Settings>Advanced settings. You should see the “Webhook Test” option, please click “Test Webhook Connection” to test the webhook. Please copy the Mollie logs again after this.
- Impact description: Please confirm if the plugin impacts the site functions in any way, including whether the plugin is still functioning, and what merchants are experiencing aside from the error
Thanks in advance for your help.
Regards,
Femi.Hi all
If you encountered an error after updating from version 8.1.2 to 8.1.3, this appears to have been caused by a temporary timing issue during the update process itself. In some cases, requests (such as admin or REST requests) can be triggered while the plugin files are still being replaced on the server, which can briefly lead to a mismatch between old and new files.
Note that is a one-time issue that can only occur during the update process. Once the update has completed successfully, the plugin works as expected and the error should not occur again.
Optional verification
If you would like to confirm that the update completed correctly, you can do the following:
- Go to WordPress → Plugins → Plugin File Editor
- Open the file src/Payment/inc/services.php
- Around line 125, confirm that the RestApi class is instantiated with three arguments, unlike the note in the error logs.
If you notice the error again or have any concerns about checkout or payments, please contact us and include your latest WooCommerce/Mollie logs so we can take a closer look.
Thank you.
Regards,
FemiHey Femi,
I see this on line 125:
return new RestApi($container->get(MollieOrderService::class), $container ->get(Logger::class), $webhookTestService);
Is that ok?
Like said I did receive an order after the update and the payment went trhough ok. I did not see any issues what so ever. So, I do hope it was a one time occurrence and hope it will not manifest again.@adri-oosterwijk Thanks for calling it in and @femiyb thanks for clearing that up. I received the same mail ‘Je site heeft een technisch probleem’.
-
This reply was modified 3 weeks, 2 days ago by
You must be logged in to reply to this topic.