-
Notifications
You must be signed in to change notification settings - Fork 817
Connection: protected owner class #43601
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
base: trunk
Are you sure you want to change the base?
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Wpcomsh plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 1 file.
|
9d91179
to
397552e
Compare
* Adjusted the top offset for the animated label in the contact form textarea to ensure proper alignment, setting it to a minimum of 15px plus border size for consistency.
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.
Quick question to determine if we can simplify the overall approach:
Given the jetpack_connection_get_verified_errors
filter introduced in the connection package counterpart PR and assuming we modify the error handler here to handle the error code accordingly would we still need all these filters?
Example:
add_filter( 'jetpack_connection_get_verified_errors', array( $this, 'handle_error' ) );
public function handle_error( $verified_errors ) {
// Check if option is populated
// Check if user exists
// If yes, delete the option
// If not, proceed with adding the error in the $verified_errors array
}
@fgiannar Thanks for checking it out. I have simplified the class a bit (single message, some logic for MyJetpack & Dashboard differences, e.t.c). While working on this, I also realized that the delete method is not clearing The class may not be much smaller now, but I think it is less bloated and contains fewer unnecessary lines of code. |
projects/plugins/wpcomsh/connection/class-protected-owner-error-handler.php
Outdated
Show resolved
Hide resolved
projects/plugins/wpcomsh/connection/class-protected-owner-error-handler.php
Outdated
Show resolved
Hide resolved
projects/plugins/wpcomsh/connection/class-protected-owner-error-handler.php
Show resolved
Hide resolved
I refactored the Error_Handler class in the other PR so we can move most of the code out of this class. No filters, React dashboard... everything but the bare necessities (and that delete method 😊) is out. |
Related to: VULCAN-86
P2: pghT6q-3V-p2
Proposed changes:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
wp option update jetpack_connection_protected_owner_error --format=json '{"error_type":"missing_owner","email":"[email protected]","timestamp":1747835900}'