Skip to content
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 PaymentGatewaySuggestionsDataSourcePoller and disable deprecation logging #46163

Merged
merged 7 commits into from Apr 3, 2024

Conversation

ilyasfoo
Copy link
Contributor

@ilyasfoo ilyasfoo commented Apr 3, 2024

Changes proposed in this Pull Request:

Addresses the following issues:

  • Similar fatal occurring from PaymentGatewaySuggestionsDataSourcePoller (pb22l9-2AS-p2#comment-2838)
  • Deprecation message flooding debug.log (p1712065654429989-slack-C01SFMVEYAK)

Follow-up to #45892

  • Apply the same "fix" for PaymentGatewaySuggestionsDataSourcePoller
  • Disable logging since it's flooding WC 8.8.0 users

How to test the changes in this Pull Request:

Upgrade test

  1. Follow the instructions in p1711313371293309/1711312760.121469-slack-C05JQBR78RW to create Woo Express site
  2. Go to /wp-admin/plugin-install.php
  3. Upload WooCommerce with the zipfile in this PR (artifact, or woocommerce.zip)
  4. Go to WooCommerce > Status > Logs and look for fatal-errors-* log
  5. Observe no fatal error of the following:
CRITICAL Uncaught Error: Class "Automattic\WooCommerce\Admin\RemoteSpecs\DataSourcePoller" not found in /srv/htdocs/wp-content/plugins/woocommerce/src/Internal/Admin/WCPayPromotion/WCPayPromotionDataSourcePoller.php:9

or

Critical Uncaught Error: Class "Automattic\WooCommerce\Admin\RemoteSpecs\DataSourcePoller" not found in /srv/htdocs/wp-content/plugins/woocommerce/src/Admin/Features/PaymentGatewaySuggestions/PaymentGatewaySuggestionsDataSourcePoller.php:10

Downgrade test

  1. Go back to /wp-admin/plugin-install.php
  2. Upload WooCommerce 8.7.0
  3. Go to WooCommerce > Status > Logs and look for fatal-errors-* log
  4. Observe no similar fatal error

Error log test

  1. SSH to your site
  2. Run tail -f /tmp/php-errors
  3. Go to WooCommerce > Home
  4. Observe no message Automattic\WooCommerce\Admin\DataSourcePoller is deprecated since version 8.8.0! Use Automattic\WooCommerce\Admin\RemoteSpecs\DataSourcePoller instead.

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Comment

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Apr 3, 2024
@ilyasfoo ilyasfoo marked this pull request as ready for review April 3, 2024 10:37
@ilyasfoo ilyasfoo requested review from a team, chihsuan and rjchow April 3, 2024 10:37
Copy link
Contributor

github-actions bot commented Apr 3, 2024

Hi @chihsuan, @rjchow, @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:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@nigeljamesstevenson
Copy link
Contributor

Hi @ilyasfoo , I built your branch and uploaded the zip and didn't see the error (and retested with the Beta and RC and witnessed it on both) - thanks!

Copy link
Contributor

@nigeljamesstevenson nigeljamesstevenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested well for me - thanks a lot!

@nigeljamesstevenson nigeljamesstevenson merged commit ded85d1 into trunk Apr 3, 2024
19 of 23 checks passed
@nigeljamesstevenson nigeljamesstevenson deleted the fix/datasourcepoller-upgrade-issues branch April 3, 2024 13:42
@github-actions github-actions bot added this to the 8.9.0 milestone Apr 3, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Apr 3, 2024
@nigeljamesstevenson nigeljamesstevenson added needs: internal testing Indicates if the PR requires further testing conducted by Solaris status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Apr 3, 2024
senadir pushed a commit that referenced this pull request Apr 3, 2024
… logging (#46163)

* Temporarily disable deprecation logging and use old DataSourcePoller class

* Changelog

* Update DataSourcePoller.php

* Change to comment for lint

* Typo again

* Lint

* Better comment from @nigeljamesstevenson
@Stojdza Stojdza modified the milestones: 8.9.0, 8.8.0 Apr 3, 2024
github-actions bot pushed a commit that referenced this pull request Apr 3, 2024
… logging (#46163)

* Temporarily disable deprecation logging and use old DataSourcePoller class

* Changelog

* Update DataSourcePoller.php

* Change to comment for lint

* Typo again

* Lint

* Better comment from @nigeljamesstevenson
Stojdza pushed a commit that referenced this pull request Apr 3, 2024
* Fix PaymentGatewaySuggestionsDataSourcePoller and disable deprecation logging (#46163)

* Temporarily disable deprecation logging and use old DataSourcePoller class

* Changelog

* Update DataSourcePoller.php

* Change to comment for lint

* Typo again

* Lint

* Better comment from @nigeljamesstevenson

* Prep for cherry pick 46163

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
Co-authored-by: WooCommerce Bot <no-reply@woo.com>
senadir pushed a commit that referenced this pull request Apr 4, 2024
… logging (#46163)

* Temporarily disable deprecation logging and use old DataSourcePoller class

* Changelog

* Update DataSourcePoller.php

* Change to comment for lint

* Typo again

* Lint

* Better comment from @nigeljamesstevenson
senadir pushed a commit that referenced this pull request Apr 4, 2024
… logging (#46163)

* Temporarily disable deprecation logging and use old DataSourcePoller class

* Changelog

* Update DataSourcePoller.php

* Change to comment for lint

* Typo again

* Lint

* Better comment from @nigeljamesstevenson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: internal testing Indicates if the PR requires further testing conducted by Solaris plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants