-
Notifications
You must be signed in to change notification settings - Fork 804
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
Subscriptions Block: Remove logged in view for wpcom #18550
Conversation
Caution: This PR has changes that must be merged to WordPress.com |
Scheduled Jetpack release: February 16, 2021. Thank you for the great PR description! When this PR is ready for review, please apply the |
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.
On wpcom, I was able to see the subscription form both as a logged-in and a not-logged-in user.
When I submitted the form as a logged-in user, it worked as expected, and I received the follow up email at the address I used:
However when I tested as a logged-out user, I got a message saying I was already subscribed (I made 100% sure the email I was using was not already subscribed), and received no email: <-- After rebuilding jetpack, this is no longer happening. It is now working for both logged-in and logged-out users.
@@ -108,11 +108,7 @@ function widget( $args, $instance ) { | |||
|
|||
self::render_widget_status_messages( $instance ); | |||
|
|||
if ( self::is_current_user_subscribed() ) { | |||
self::render_widget_already_subscribed( $instance ); |
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.
Double checking -- is removing this already-subscribed view meant to be included with removing the logged-in view? If so, can we get rid of the now unused render_widget_already_subscribed
function?
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.
Yes, I think that would be a good idea. Done in 5c61b44
Just checked this on a sandboxed site, and it seemed to work okay logged in and logged out. |
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.
Tested well for me on Jetpack, and the error I saw on wpcom for logged-out is working fine after a rebuild. LGTM!
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.
The linting errors will stop us from merging this I'm afraid.
I think I'll need to mark to ignore these errors because removing these extra escapes was breaking the reg ex. Edit: Wrong PR :) |
I've added the jetpack textdomain since the ignore does not work. The wpautop() pre-existed this PR, but I can't escape html with this since, or remove it since it will break existing usage. |
@jeherve This one look good now? |
Nevermind! Seeing one last lint error 🤦🏻 Fixing. |
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.
This looks good to me. It's a big change for WordPress.com so I think it may be good to warn Happiness about the change, but I think it makes for a good change.
@@ -108,11 +108,7 @@ function widget( $args, $instance ) { | |||
|
|||
self::render_widget_status_messages( $instance ); | |||
|
|||
if ( self::is_current_user_subscribed() ) { | |||
self::render_widget_already_subscribed( $instance ); |
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.
Yes, I think that would be a good idea. Done in 5c61b44
r222134-wpcom |
Fixes #15474
Fixes #18085
Changes proposed in this Pull Request:
Does this pull request change what data or activity we track or use?
No
Testing instructions:
Proposed changelog entry for your changes: