• Resolved IBBoard

    (@ibboard)


    It seems like v2.9.1 of the plugin is generally causing lots of problems. But I’m getting a different stack trace to everyone else. As far as I can tell from the stack trace, this is entirely within the PayPal plugin.

    An error of type E_ERROR was caused in line 1241 of the file …/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway/services.php. Error message: Uncaught Error: Class "WooCommerce\PayPalCommerce\WcGateway\FraudNet\FraudNetSessionId" not found in …/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway/services.php:1241
    Stack trace:
    #0 …/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/DelegatingContainer.php(117): WooCommerce\PayPalCommerce\WcGateway\WCGatewayModule::WooCommerce\PayPalCommerce\WcGateway\{closure}()
    #1 …/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/DelegatingContainer.php(56): WooCommerce\PayPalCommerce\Vendor\Dhii\Container\DelegatingContainer->invokeFactory()
    #2 …/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway/services.php(1247): WooCommerce\PayPalCommerce\Vendor\Dhii\Container\DelegatingContainer->get()
    #3 …/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/DelegatingContainer.php(117): WooCommerce\PayPalCommerce\WcGateway\WCGatewayModule::WooCommerce\PayPalCommerce\WcGateway\{closure}()
    #4 …/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/DelegatingContainer.php(56): WooCommerce\PayPalCommerce\Vendor\Dhii\Container\DelegatingContainer->invokeFactory()
    #5 …/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/services.php(240): WooCommerce\PayPalCommerce\Vendor\Dhii\Container\DelegatingContainer->get()
    #6 …/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/DelegatingContainer.php(117): WooCommerce\PayPalCommerce\ApiClient\ApiModule::WooCommerce\PayPalCommerce\ApiClient\{closure}()
    #7 …/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/DelegatingContainer.php(56): WooCommerce\PayPalCommerce\Vendor\Dhii\Container\DelegatingContainer->invokeFactory()
    #8 …/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-subscriptions/services.php(28): WooCommerce\PayPalCommerce\Vendor\Dhii\Container\DelegatingContainer->get()
    #9 …/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/DelegatingContainer.php(117): WooCommerce\PayPalCommerce\WcSubscriptions\WcSubscriptionsModule::WooCommerce\PayPalCommerce\WcSubscriptions\{closure}()
    #10 …/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/DelegatingContainer.php(56): WooCommerce\PayPalCommerce\Vendor\Dhii\Container\DelegatingContainer->invokeFactory()
    #11 …/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-compat/services.php(30): WooCommerce\PayPalCommerce\Vendor\Dhii\Container\DelegatingContainer->get()
    #12 …/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/DelegatingContainer.php(117): WooCommerce\PayPalCommerce\Compat\CompatModule::WooCommerce\PayPalCommerce\Compat\{closure}()
    #13 …/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/DelegatingContainer.php(56): WooCommerce\PayPalCommerce\Vendor\Dhii\Container\DelegatingContainer->invokeFactory()
    #14 …/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/CompositeContainer.php(53): WooCommerce\PayPalCommerce\Vendor\Dhii\Container\DelegatingContainer->get()
    #15 …/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/CachingContainer.php(61): WooCommerce\PayPalCommerce\Vendor\Dhii\Container\CompositeContainer->get()
    #16 …/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/CachingContainer.php(161): WooCommerce\PayPalCommerce\Vendor\Dhii\Container\CachingContainer->WooCommerce\PayPalCommerce\Vendor\Dhii\Container\{closure}()
    #17 …/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/CachingContainer.php(128): WooCommerce\PayPalCommerce\Vendor\Dhii\Container\CachingContainer->invokeGenerator()
    #18 …/wp-content/plugins/woocommerce-paypal-payments/lib/packages/Dhii/Container/CachingContainer.php(60): WooCommerce\PayPalCommerce\Vendor\Dhii\Container\CachingContainer->getCached()
    #19 …/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-compat/src/CompatModule.php(94): WooCommerce\PayPalCommerce\Vendor\Dhii\Container\CachingContainer->get()
    #20 …/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-compat/src/CompatModule.php(49): WooCommerce\PayPalCommerce\Compat\CompatModule->initialize_ppec_compat_layer()
    #21 …/wp-content/plugins/woocommerce-paypal-payments/bootstrap.php(67): WooCommerce\PayPalCommerce\Compat\CompatModule->run()
    #22 …/wp-content/plugins/woocommerce-paypal-payments/woocommerce-paypal-payments.php(77): {closure}()
    #23 …/wp-content/plugins/woocommerce-paypal-payments/woocommerce-paypal-payments.php(92): WooCommerce\PayPalCommerce\init()
    #24 …/wp-includes/class-wp-hook.php(324): WooCommerce\PayPalCommerce\{closure}()
    #25 …/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #26 …/wp-includes/plugin.php(517): WP_Hook->do_action()
    #27 …/wp-settings.php(555): do_action()
    #28 …/wp-config.php(113): require_once('...')
    #29 …/wp-load.php(50): require_once('...')
    #30 …/wp-blog-header.php(13): require_once('...')
    #31 …/index.php(17): require('...')
    #32 {main}
    thrown

    Based on the version control history, this class was explicitly removed in v2.9.1 but there’s still a use statements for it.

    Hopefully you can get a fix for this out quickly, as it’s a rather critical flaw but seems quite trivial.

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

    (@inpsydekrystian)

    Hello @ibboard

    Thank you for reaching out and sharing these details.

    While the type E_ERROR points to a specific class, this doesn’t necessarily indicate a problem with the class itself. It’s more likely that there’s a conflict occurring.

    Could you let us know if you’re able to consistently reproduce the issue? If so, we recommend disabling all other plugins and checking if the problem persists. Then, enable the plugins one by one to identify which one might be triggering the conflict.

    To be honest, this release hasn’t caused widespread problems, and so far, we’ve only had a few reports of fatal errors. However, if the issue continues, please let us know so we can investigate further.

    Kind Regards,
    Krystian

    Thread Starter IBBoard

    (@ibboard)

    There are three other support tickets about fatal errors. And that’s in a micro version update. If that’s a normal level of errors to get reported after a micro version then it sounds like I need to consider another plugin!

    I included links to the exact lines in version control where the class is still referenced and the commit where the class file is deleted. I can’t find any declaration of the class anywhere in code. But I can try some other debugging over the weekend as well.

    Thread Starter IBBoard

    (@ibboard)

    I’ve traced this down to a combination of a PHP OpCache issue (the first time I’ve seen it in five years of running this blog) and some unexpected PHP behaviour.

    Basically, there is trailing code, which I found and linked to, but PHP silently ignores the fact that there’s a use statement for something that doesn’t exist.

    The error occurred because the PHP OpCache detected that the file had been deleted but hadn’t detected that the service.php file had been updated, so the v2.9.0 constructor call was still invoked but the class had already been purged from the cache and didn’t exist.

    As a developer of 20 years who was using PHP4, this does not fill me with confidence in the modern PHP ecosystem.

    Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @ibboard

    There are three other support tickets about fatal errors. And that’s in a micro version update. If that’s a normal level of errors to get reported after a micro version then it sounds like I need to consider another plugin!

    Most of the fatal errors from this version were related to our upgrade to modularity, and these issues were not entirely within our control. The remaining errors were tied to a conflict with a currency swapping plugins, which we have already resolved. The error you have reported, however, is the first time we are seeing this specific issue.

    In any case, thank you for sharing these details. I will forward this to our developer, and I will get back to you with their response as soon as possible. Apologies for the delay, and thank you for your patience.

    Kind Regards,

    Krystian

    Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @ibboard

    As promised, here’s the developer’s response:

    This seems to be one of those unusual errors we occasionally see after users upgrade the plugin—something that can happen with any version (and likely with any plugin, not just PayPal Payments). It appears this issue was triggered by your caching setup, combined with how PHP handles certain cases, and unfortunately, PHP is not perfect. So, it’s probably not something we can control or fix on our end. It’s not an issue caused by the plugin itself.

    Regarding the “class explicitly removed in v2.9.1 but there’s still a use statement for it”—yes, the use line should ideally be deleted. However, it shouldn’t affect anything unless that class is actively used in the file. As far as we know, the use Some\Namespace\MyClass line simply tells PHP that MyClass in the file refers to Some\Namespace\MyClass, so it shouldn’t be causing any issues by itself.

    If you have any questions about this, feel free to let me know, and I’ll forward them.

    Kind Regards,

    Krystian

    Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @ibboard

    Since we have not received any further communication from you, we are assuming that your issue has been resolved.

    Therefore, we mark this thread as resolved. If you still have any questions or if a new problem arises, don’t hesitate to open a new thread.

    Kind regards,
    Krystian

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