woocommerce / woocommerce-gateway-paypal-express-checkout

58 stars 65 forks source link

Critical error when upgrading from PayPal Checkout to PayPal Payments on multisite #890

Closed xpurichan closed 2 years ago

xpurichan commented 2 years ago

Describe the bug

Cross-posting this for further review. The Inpsyde team responsible for PayPal Payments could not reproduce (though I was able to when the issue was initially reported) so I wanted to share it here to be safe:

We are able to activate the PayPal Payments plugin without issue on a single site, but when network activating the plugin as part of the upgrade flow from PayPal Checkout on a multisite, it can lead to a 500/critical error with the following PHP error in the logs:

Fatal error: Uncaught Error: Call to a member function get_active_api_credentials() on null in /srv/htdocs/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-compat/src/PPEC/class-ppechelper.php:47

It seems like this only happens as part of an upgrade flow, when we follow the WooCommerce message's notice to upgrade from WooCommerce PayPal Checkout Gateway to WooCommerce PayPal Payments. The behavior was reproducible twice, but I can't reproduce it a third time using the same steps.

Screenshot: https://user-images.githubusercontent.com/33190975/137217953-114a391a-b461-4e66-b534-4758774e12f7.jpg


Full/original issue can be found here:

https://github.com/woocommerce/woocommerce-paypal-payments/issues/326

leonardola commented 2 years ago

I cannot reproduce this. It seem to be fixed by https://github.com/woocommerce/woocommerce-paypal-payments/pull/364 Can you still reproduce this?

xpurichan commented 2 years ago

Fixed! https://github.com/woocommerce/woocommerce-paypal-payments/issues/326#issuecomment-993810434