• Hi,

    I am getting the following error when running any PHP script from console. When I deactivate this plugin the error is gone:

    PHP Fatal error:  Uncaught Error: Class 'Krokedil\WpApi\Request' not found in /srv/www/windmeile.com/httpdocs/wp-content/plugins/klarna-payments-for-woocommerce/classes/requests/class-kp-requests.php:15
    Stack trace:
    #0 /srv/www/windmeile.com/httpdocs/wp-content/plugins/klarna-payments-for-woocommerce/klarna-payments-for-woocommerce.php(340): include_once()
    #1 /srv/www/windmeile.com/httpdocs/wp-content/plugins/klarna-payments-for-woocommerce/klarna-payments-for-woocommerce.php(166): WC_Klarna_Payments->include_files()
    #2 /srv/www/windmeile.com/httpdocs/wp-includes/class-wp-hook.php(324): WC_Klarna_Payments->init()
    #3 /srv/www/windmeile.com/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #4 /srv/www/windmeile.com/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 /srv/www/windmeile.com/httpdocs/wp-settings.php(555): do_action()
    #6 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1336): require('/srv/www/windme...')
    #7 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1254 in /srv/www/windmeile.com/httpdocs/wp-content/plugins/klarna-payments-for-woocommerce/classes/requests/class-kp-requests.php on line 15
    Fatal error: Uncaught Error: Class 'Krokedil\WpApi\Request' not found in /srv/www/windmeile.com/httpdocs/wp-content/plugins/klarna-payments-for-woocommerce/classes/requests/class-kp-requests.php:15
    Stack trace:
    #0 /srv/www/windmeile.com/httpdocs/wp-content/plugins/klarna-payments-for-woocommerce/klarna-payments-for-woocommerce.php(340): include_once()
    #1 /srv/www/windmeile.com/httpdocs/wp-content/plugins/klarna-payments-for-woocommerce/klarna-payments-for-woocommerce.php(166): WC_Klarna_Payments->include_files()
    #2 /srv/www/windmeile.com/httpdocs/wp-includes/class-wp-hook.php(324): WC_Klarna_Payments->init()
    #3 /srv/www/windmeile.com/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #4 /srv/www/windmeile.com/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 /srv/www/windmeile.com/httpdocs/wp-settings.php(555): do_action()
    #6 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1336): require('/srv/www/windme...')
    #7 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1254 in /srv/www/windmeile.com/httpdocs/wp-content/plugins/klarna-payments-for-woocommerce/classes/requests/class-kp-requests.php on line 15
    Error: Es gab einen kritischen Fehler auf Ihrer Website.Erfahren Sie mehr über die Problembehandlung in WordPress. Es gab einen kritischen Fehler auf Ihrer Website.

    Any idea? Thanks.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello Windmeile,

    Thank you for reaching out.

    We were able to replicate the error you’re experiencing only in older versions of the Klarna Payments plugin. Please make sure that you are using the latest version of Klarna Payments. If the plugin code is downloaded or cloned from a source like GitHub, remember to run the composer install command in the plugin directory.

    If this does not resolve the issue, please let us know, and we’ll continue troubleshooting!

    Thread Starter windmeile

    (@windmeile)

    Hi,

    thanks for getting back. I double checked and we have the most recent version 3.8.3 and woocommerce 9.3.3. The error still appears.

    Thanks for diving in.

    Hi,

    The error you encountered references a namespace that has not been used since version 3.6.2 of the Klarna Payments plugin. The namespace used in the latest version can be found?here.

    We’re having difficulty troubleshooting this issue, as we’re unable to replicate the error in version 3.8.3 of the plugin. Please ensure there are no old copies of the plugin left in your environment, as this might be causing the issue.

    Thread Starter windmeile

    (@windmeile)

    thanks again for your reply. I checked and all files in the klarna plugin folder have been updated with the latest plugin update. Also all php caches have been cleared. The content of the file class-kp-requests.php is identical to the content of the file in the link you have provided.

    Any other idea?

    I have to mention, this error is not appearing in my php error log. it is appearing using a wp cli command namely wp varnish purge. I use this from time to time to clear my server side varnish cache. It then triggers this error, and when I deactivate the klarna plugin, its gone and I can successfully clear my cache.

    Hello Windmeile!

    We conducted additional tests using WP CLI in the terminal on a site with the latest version of the plugin, but were unable to reproduce the same issue you’re experiencing.

    It might be worth considering a complete reinstallation of the plugin in case something went awry during an update.

    Additionally, could you try testing this in a different environment than your current server. For example, setting up a fresh installation of Klarna Payments in a completely new setup to see if the same issue arises. There’s always a chance that something specific to your server configuration, or possibly a plugin conflict, could be contributing to the problem.

    If that doesn’t resolve the issue, unfortunately, it’s difficult to pinpoint the exact cause.

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