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
Add notice about webhooks using the legacy REST API #40866
Conversation
Hi @coreymckrill, 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: |
Test Results SummaryCommit SHA: 7949d74
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. |
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.
Works as described in the excellent testing instructions. A couple of wording suggestions, and one small concern about caching.
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
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.
👍 Confirmed that the legacy count is accurate with Docket Cache enabled. Everything else looks good as well.
@Konamiman I'm not sure why some of the checks are failing, you might want to do a rebase if this was branched before #40572 got merged... |
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
Changes proposed in this Pull Request:
This pull request is an extension of #40535. It:
WebhookUtil::get_legacy_webhooks_count
method. It counts the existing webhooks that are configured to use the Legacy REST API classes to generate their payloads.api_version
optional argument toWC_Webhook_Data_Store::search_webhooks
.get_legacy_webhooks_count
.Note that if legacy webhooks exist and the Legacy REST API is enabled, two notices will appear. This is on purpose, it's better to be "overinformative" in this case and the notices can be dismissed anyway.
How to test the changes in this Pull Request:
wp eval 'WC_Admin_Notices::reset_admin_notices();'
wp db query "delete from wp_usermeta where meta_key='dismissed_legacy_webhooks_unsupported_in_woo_90'"
).Changelog entry
Significance
Type
Message
Comment