Open Thiararapeter opened 10 months ago
also when plugin not activated but installed shows "
Are you saying that the "View details" link shows up even when your plugin is inactive? That would be unusual since the update checker obviously cannot add the "View details" link when it's not running. Is there something else that's adding the link?
Hello, same here. When i click open view detail and the plugin is installed, the button should be "Activ" not "Install now".
After some research, it looks like this happens when the plugin slug is different from the name of the plugin directory. As a test, I took a plugin hosted on worpdress.org - a plugin that doesn't use PUC - and renamed its directory from slug
to foo-slug
. The button text also changed from "Active" to "Install Now".
The WP core function that detects the plugin state is install_plugin_install_status()
in /wp-admin/includes/plugin-install.php
. It doesn't look like there's a way to filter its input or output. Theoretically, PUC could change the slug in the update API response before it gets to install_plugin_install_status()
, but I suspect that might break something else. The slug is used in a bunch of other places and it would take a while to find all of them and carefully verify that using the directory name instead would be safe.
Since the same problem can happen with plugins not using PUC, perhaps it's not something to be fixed on this end? In most cases, if you pick a slug that matches the directory name, and the user doesn't rename the plugin for some reason, it should be fine.
My mistake, you are right. It was the wrong slug. Thank you for the fast help and the great plugin!
Hello, There is an issue with installed plugin. when i click open view detail and te plugin is installed, be button should be "latest verson installed" but am getting "install now button" mostly works but after plugin updates, yes the plugin is installed but on view details plugin have "install now" attached will demonstrate what am trying to say.