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

Health: catch addons installed in wrong folder #2069

Merged

Conversation

mircobabini
Copy link
Member

@mircobabini mircobabini commented May 9, 2022

All Submissions:

Changes proposed in this Pull Request:

Sometimes you download an addon from github and you don't remove the -branch suffix.

This is from a conversation with Kim White; sometimes you are investigating a weird situation on a customer's site and you don't see that there's an addon installed with that wrong folder name, which prevents to be shown into PMPro > Add Ons > Installed list. Also prevents it to be updated.

Thanks to this PR, you will immediately see it into Site Health. Can be a starting point to show a warning into PMPro > Add Ons.
Screenshot 2022-05-09 at 16 49 09

How to test the changes in this Pull Request:

  1. Download a copy of an addon from github and install
  2. Check Site Health > Info > PMPro section

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully run tests with your changes locally?

*
* @since TBD
*/
function pmpro_searchWrongFolderNameAddons() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the best name for this function.

We've been inconsistent on this in the past, but basically any new function we had should use snake case, e.g. pmpro_search_wrong_folder_name_addons().

But then I also think pmpro_find_wrong_folder_name_addons() might be more descriptive? Is there something even better? What other contexts are we going to use this? We only use this once, so we're abstracting a little earlier, but I think it's okay here. Let's just imagine how it might be used going forward and have the function name and doc block make the most sense.

Thanks!

@dparker1005 dparker1005 added this to the 3.1 milestone Jun 4, 2024
@dparker1005 dparker1005 changed the base branch from dev to v3.1 June 12, 2024 16:25
@dparker1005 dparker1005 merged commit ca9feca into strangerstudios:v3.1 Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants