• Resolved nikdow

    (@nikdow)


    [17-Oct-2025 05:27:56 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function WooCommerce\PayPalCommerce\Button\Helper\WooCommerceOrderCreator::__construct(), 3 passed in /home/lamp/wordpress/plugins/woocommerce-paypal-payments/modules/ppcp-button/services.php on line 269 and exactly 5 expected in /home/lamp/wordpress/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Helper/WooCommerceOrderCreator.php:59
    Stack trace: 0 /home/lamp/wordpress/plugins/woocommerce-paypal-payments/modules/ppcp-button/services.php(269): WooCommerce\PayPalCommerce\Button\Helper\WooCommerceOrderCreator->__construct(Object(WooCommerce\PayPalCommerce\WcGateway\FundingSource\FundingSourceRenderer), Object(WooCommerce\PayPalCommerce\Session\SessionHandler), Object(WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper)) 1 /home/lamp/wordpress/plugins/woocommerce-paypal-payments/lib/packages/Inpsyde/Modularity/Container/ReadOnlyContainer.php(46): WooCommerce\PayPalCommerce\Button\ButtonModule::WooCommerce\PayPalCommerce\Button{closure}(Object(WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Container\ReadOnlyContainer)) 2 /home/lamp/wordpress/plugins/woocommerce-paypal-payments/modules/ppcp-button/services.php(186): WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Container\ReadOnlyContainer->get(‘button.helper.w…’) 3 /home/lamp/wordpress/plugins/woocommerce-paypal-payments/lib/packages/Inpsyde/Modularity/Container/ReadOnlyContainer.php(46): WooCommerce\PayPalCommerce\Button\ButtonModule::WooCommerce\PayPalCommerce\Button{closure}(Object(WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Container\ReadOnlyContainer)) 4 /home/lamp/wordpress/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/ButtonModule.php(128): WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Container\ReadOnlyContainer->get(‘button.endpoint…’) 5 /home/lamp/wordpress/core/wp6.8/wp-includes/class-wp-hook.php(324): WooCommerce\PayPalCommerce\Button\ButtonModule::WooCommerce\PayPalCommerce\Button{closure}(”) 6 /home/lamp/wordpress/core/wp6.8/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) 7 /home/lamp/wordpress/core/wp6.8/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 8 /home/lamp/wordpress/plugins/woocommerce/includes/class-wc-ajax.php(116): do_action(‘wc_ajax_ppc-app…’) 9 /home/lamp/wordpress/core/wp6.8/wp-includes/class-wp-hook.php(324): WC_AJAX::do_wc_ajax(”) 10 /home/lamp/wordpress/core/wp6.8/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(false, Array) 11 /home/lamp/wordpress/core/wp6.8/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 12 /home/lamp/wordpress/core/wp6.8/wp-includes/template-loader.php(13): do_action(‘template_redire…’) 13 /home/lamp/wordpress/core/wp6.8/wp-blog-header.php(19): require_once(‘/home/lamp/word…’) 14 /home/lamp/wordpress/core/wp6.8/index.php(17): require(‘/home/lamp/word…’) 15 {main}

    thrown in /home/lamp/wordpress/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Helper/WooCommerceOrderCreator.php on line 59

    I would attach the above as a file but no attachment is possible.

    All plugins are up to date. Site has been running for a few years. Error started within the last 15 hours (last successful payment was 15 hours ago).

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Krystian Syde

    (@inpsydekrystian)

    Hello @nikdow

    Thanks for the stack trace.

    The fatal points to a version mismatch or an incomplete update of the PayPal Payments plugin. Your runtime is constructing WooCommerceOrderCreator with 3 arguments, but the current class signature expects 5. Please do the following to restore consistency:

    1. Clear caches
      • Any server or plugin page cache.
    2. Reinstall the plugin cleanly
      • In wp-admin, deactivate WooCommerce PayPal Payments.
      • Delete the plugin.
      • Install it again from Plugins → Add New → search “WooCommerce PayPal Payments”, then activate.
    3. If the error persists
      • Temporarily switch to Storefront or a default theme to rule out theme.
      • Disable all other plugins except WooCommerce and PayPal Payments to exclude conflicts.

    Please also share your System Status Report so I can verify environment details:

    1. Go to WooCommerce → Status.
    2. Click Get system report, then Copy for support.
    3. Paste the report into our PrivateBin: http://privatebin.syde.com/
    4. Share the link here.

    The clean reinstall plus cache clears should address it.

    Kind Regards,
    Krystian

    Thread Starter nikdow

    (@nikdow)

    That worked, thank you.

    Thread Starter nikdow

    (@nikdow)

    Marking as closed

    Plugin Support Krystian Syde

    (@inpsydekrystian)

    Hello @nikdow

    Glad its solved.

    If this solution helped and you’re happy with the support, feel free to leave a quick review on WordPress — it means a lot to us and shows that we are needed.

    Kind regards,
    Krystian

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP error’ is closed to new replies.