fix: register reader data handlers after listeners#3901
Merged
Conversation
miguelpeixe
requested changes
Apr 9, 2025
Member
There was a problem hiding this comment.
Given the severity of handlers being registered before their actions/listeners, could you include some logging, or even throw an exception, in the handler for cases like that?
The current approach to return a WP_Error made it go unnoticed for 15 months, as we just learned.
Contributor
Author
|
right, throwing probably sounds right, but I'm afraid of doing it at this point and breaking live sites. I'll add logging |
Contributor
Author
|
@miguelpeixe , added logs. Try to register a handler before init and see them in the logs |
miguelpeixe
approved these changes
Apr 17, 2025
matticbot
pushed a commit
that referenced
this pull request
Apr 21, 2025
## [6.4.3](v6.4.2...v6.4.3) (2025-04-21) ### Bug Fixes * register reader data handlers after listeners ([#3901](#3901)) ([df71105](df71105))
Contributor
|
🎉 This PR is included in version 6.4.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All Submissions:
Changes proposed in this Pull Request:
Fixes an issue where data events handlers were not being fired and not updating the user status
How to test the changes in this Pull Request:
trunknewspack_reader_data_item_is_newsletter_subscriberandnewspack_reader_data_item_newsletter_subscribed_listsand confirm they don't existOther information: