Skip to content
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

Plugin Search Hints: only display feature suggestion when your plan supports it #11876

Merged
merged 2 commits into from Apr 3, 2019

Conversation

@jeherve
Copy link
Member

jeherve commented Apr 3, 2019

Changes proposed in this Pull Request:

Until now, when searching for "search" or "backups" under Plugins > Add New, we would display suggestions for the Search feature or the Backups feature, even though those features require a plan purchase.

With this PR, we make sure features are only suggested when your site uses a plan that supports it. That will allow you to get to know about Jetpack Backups / Jetpack Search if you purchased a plan but did not turn on the feature yet.

Fixes #11828

Testing instructions:

  • Start on a brand new free Jetpack site. Connect that site to WordPress.com.
  • Go to Plugins > Add New, and search for "cdn"
    • You should see a suggestion for our Image CDN feature.
  • Now search for "backups", or "akismet".
    • You should not see any Jetpack plugin search hints.
  • Head to Jetpack > Dashboard > Plans, and follow the flow to purchase a personal plan.
  • Head back to your site.
  • Go to Plugins > Add New, and search for "backups"
    • You should now see a suggestion for Jetpack Backups
  • Now search for "search"
    • You should not see any Jetpack plugin search hints.
  • Head to Jetpack > Dashboard > Plans, and follow the flow to upgrade to a Professional plan.
  • Head back to your site.
  • Go to Plugins > Add New, and search for "search"
    • You should now see a suggestion for Jetpack Search

Proposed changelog entry for your changes:

  • Plugin Search Hints: only display feature suggestion when your plan supports it

jeherve added some commits Apr 3, 2019

Modules: mark VaultPress module as paid.
This is helpful for other functions that rely on `plan_classes` to determine whether a
feature is supported or not. This is for example the case for Jetpack_Plan::get().

@jeherve jeherve added this to the 7.2.1 milestone Apr 3, 2019

@jeherve jeherve self-assigned this Apr 3, 2019

@jeherve jeherve requested a review from jessefriedman Apr 3, 2019

@jeherve jeherve requested a review from Automattic/jetpack-crew as a code owner Apr 3, 2019

@jetpackbot

This comment has been minimized.

Copy link

jetpackbot commented Apr 3, 2019

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: April 29, 2019.
Scheduled code freeze: April 22, 2019

Generated by 🚫 dangerJS against e6a02b1

@kraftbj

kraftbj approved these changes Apr 3, 2019

Copy link
Contributor

kraftbj left a comment

I appreciate the inline docs on why we're not using Jetpack_Plan::supports(). Tried with free, personal, and professional. Works as described.

@kraftbj kraftbj merged commit 5308f67 into master Apr 3, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
wpcom No files affecting WordPress.com found
Details

@kraftbj kraftbj deleted the update/psh-paid-modules branch Apr 3, 2019

kraftbj added a commit that referenced this pull request Apr 3, 2019

Plugin Search Hints: only display feature suggestion when your plan s…
…upports it (#11876)

* Modules: mark VaultPress module as paid.

This is helpful for other functions that rely on `plan_classes` to determine whether a
feature is supported or not. This is for example the case for Jetpack_Plan::get().

* PSH: only display a feature suggestion if the plan supports it
@kraftbj

This comment has been minimized.

Copy link
Contributor

kraftbj commented Apr 3, 2019

Picked to branch-7.2 in 9de9d83 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.