-
Notifications
You must be signed in to change notification settings - Fork 69
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
Reset duplicate notifications from new plugins #8919
Reset duplicate notifications from new plugins #8919
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: +86 B (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
138f740
to
dd5b853
Compare
…into add/reset-duplicate-notifications-from-new-plugins
…into add/reset-duplicate-notifications-from-new-plugins
631d987
to
af447bc
Compare
I re-assigned the review because of the AFKs. |
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.
Code here LGTM and is working as described. I'm trying to think of any edge-cases, whereby an extension, for which we have already dismissed a notice, might reintroduce a duplicated payment method on update or some other mysterious circumstance...but in any case, I think it's a pretty trivial hypothetical and it's hurting my hollow head even thinking too hard about it.
I think this is a really valuable enhancement and I wasn't able to find a way to break it. Nice one!
Closes #8809
Changes proposed in this Pull Request
This PR ensures that a previously dismissed duplicate notice on the Settings page will reappear if a new plugin triggers duplicates again. This is accomplished by enhancing the dismissed notification object stored in
wp_options
. Previously, only the payment method was stored. With this PR, we also store the list of gateway IDs of plugins causing duplicates. This enhancement allows us to handle scenarios where new plugins cause duplicate notices.Testing instructions
class-duplicates-detection-service.php
by keeping onlycard
fromstripe
now, refresh the Settings pagenpm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge