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
Fix DataSourcePoller footer error on upgrade downgrade #45892
Fix DataSourcePoller footer error on upgrade downgrade #45892
Conversation
Test Results SummaryCommit SHA: 6854e2d
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
Hi @chihsuan, @moon0326, @woocommerce/ghidorah Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and tested well. 🚢
* Add fix * Changelog * Change fix approach since it's crashing on 8.7.0
Delete changelog files based on PR #45892
Delete changelog files based on PR #45892
Delete changelog files based on PR #45892
Delete changelog files based on PR #45892
Changes proposed in this Pull Request:
Fixes fatal error caused by DataSourcePoller class refactor p1711334228664619/1711312760.121469-slack-C05JQBR78RW
The issue originates from an existing version of WooCommerce is run while it is being upgraded/downgraded.
In this instance, my observation is the
WCPayPromotionDataSourcePoller
file is the new version while being called from a previous version WC (currently 8.7.0 in a standard Woo Express site). As a result,Automattic\WooCommerce\Admin\RemoteSpecs\DataSourcePoller
doesn't exists since it's introduced in 8.8.0.My fix will simply use the old
DataSourcePoller
path which is handled properly in previous versions since the file's inception and 8.8.0.How to test the changes in this Pull Request:
Upgrade test
/wp-admin/plugin-install.php
WooCommerce > Status > Logs
and look forfatal-errors-*
logCRITICAL Uncaught Error: Class "Automattic\WooCommerce\Admin\RemoteSpecs\DataSourcePoller" not found in /srv/htdocs/wp-content/plugins/woocommerce/src/Internal/Admin/WCPayPromotion/WCPayPromotionDataSourcePoller.php:9
Downgrade test
/wp-admin/plugin-install.php
WooCommerce > Status > Logs
and look forfatal-errors-*
logChangelog entry
Significance
Type
Message
Comment