-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Plugins: Fix/plugins not available on any site #2562
Conversation
I'm logged in as a test user without a business plan, but I'm having trouble reproducing the first screenshot. I still get the Want to add a store to your site? message on It also looks like the |
To see the current screen you should be able to just visit It could be that the AB test it causing you not to see same screenshot as me. Yes you are right about the |
4bb4849
to
d5987a2
Compare
@jordwest can you take another look? |
@enejb: A couple of thoughts:
|
d5987a2
to
3eddcb7
Compare
@jordwest I just:
Regarding the |
I think that might be a good approach since currently it would be quite a big change to refactor it. |
} | ||
} | ||
|
||
if ( ! sites.hasSiteWithPlugins() && ! site ) { |
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.
I think the order of the conditions should be reversed here - otherwise, if site
is undefined, an exception will be thrown.
Scratch that, I thought it was site
twice, but it's sites
and site
.
@klimeryk I think I fixed all the suggestions that you had. Thanks for the review? Do you think this is ready to merge? After a rebase and squashing of some of the commits. |
|
title: i18n.translate( 'Want to add a store to your site?' ), | ||
line: i18n.translate( 'Support for Shopify, Ecwid, and Gumroad is now available for WordPress.com Business.' ), | ||
action: i18n.translate( 'Upgrade Now' ), | ||
actionURL: '/plans/' + siteSlug, |
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.
What if siteSlug
is undefined
, like in this line?
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 could be handled using an ES6 default parameter:
const getWpcomPluginPageError = ( siteSlug = '' ) => {
...
}
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.
Ohhh, nice 👍 Gotta remember this ES6 goodness!
168464f
to
1fadde7
Compare
Thanks for addressing all my comments regarding code. The only thing that's left is the issue I've described in my previous comment. |
Thanks for all the reviews @klimeryk very much approached. The idea behind I think it would be good to remove the plugins link in the sidebar for users that don't have any sites that can manage plugins. But keep the link always for single sites since they would have the screen to upgrade the site for example. Let me know if the latest changed that I pushed fix the issue you had earlier. |
Yup, that did it! Thanks for sticking with me while we got to the bottom of this. |
712f4d9
to
efe51b2
Compare
In the case where the user has no sites that have plugins remove the Plugins link from the sidebar.
In case when the user has no sites with plugins display Drake and ask the user to update a site to a plan.
… default error message
…t have any sites that can manage plugins
…se in the simular way we use know when a site has plugins
efe51b2
to
2fe300c
Compare
…-any-site Plugins: Fix/plugins not available on any site
Currently if you have no business plan sites and visit /plugins you end up on this page .

This PR fixes this by
cc: @drewblaisdell, @johnHackworth, @rickybanister