New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jetpack 9.6.1 loads old classes during WooCommerce setup #19624
Comments
In case it helps, WooCommerce Payments is using version |
cc @ObliviousHarmony @kbrown9, in case something comes to your mind. |
I'm trying to reproduce the problem, but I'm not sure how to get to step 2:
I don't see a screen plugin install screen that shows WCPay and Jetpack in the onboarding flow. I'm running Woo 5.2.2. |
Based on this comment about the cause of the Jetpack activation failure, I wonder if WCPay is loading a package class before the autoloader is aware that Jetpack is activated. |
On a fresh install, this should be displayed when you go to The store details I am testing for are:
|
I was able to reproduce the problem using the store details provide above. Here's what's happening:
The problem is that the autoloader can't anticipate that Jetpack is about to be activated. WooCommerce could reorder the plugins so that Jetpack is activated first (which was tested in this comment), and that should fix the immediate problem. However, the problem could occur again if, for example, WC Pay was activated second and needed a newer version of the connection package. The autoloader does attempt to identify activating plugins and treat them as active plugins here. It might be possible to intercept WooCommerce's plugin activation request and preemptively add the activating plugins to the active list. |
Is it possible to raise the priority of this? It impacts the critical flows of WooCommerce (Merchant Can go through Setup Wizard) and WC Pay (Merchant can Onboard via WooCommerce setup wizard). cc:@kbrown9 |
Hi @tammullen! I have a PR in progress for this issue in #19634, and I've requested a review from @ObliviousHarmony on that PR. Also, I see that Woo has a PR in progress to change the WCPay/Jetpack activation order in this PR, which should fix the bug you're experiencing in the critical flows. |
Steps to reproduce the issue
As reported in Automattic/woocommerce-payments#1663, there is an error that can be observed when installing Jetpack using WooCommerce's setup flow. This issue is only present on Jetpack ≥ 9.6.
For some more details on how this relates to WooCommerce and WooCommerce Payments (incl. how and why the error doesn't happen on older WC versions), please see the link above.
I am seeing the error on:
(The version of WooCommerce Payments installed by the WooCommerce setup wizard is 2.3.0.)
The error can be replicated by:
What I expected
Jetpack is installed successfully during the WooCommerce setup flow.
What happened instead
An error is shown and the installation doesn't proceed.
Screenshots
The text was updated successfully, but these errors were encountered: