0

I just completed writing a plugin from another plugin. When I changed the developer name, version and other details from the plugin file, I thought the version tracing would now be done using the new name of the plugin but it actually linked the update to the older plugin until I changed the root folder name for the plugin. Wasn't the update supposed to be happen from the details provided in the file? Please guide. Thanks

1 Answer 1

1

WordPress uses the 'plug-in slug' to identify a plug-in (and uses this as an 'id' for plug-in updates, though its not clear how, as the code isn't published). The plug-in slug is determined by the location of the .php file header containing the comment header necessary for plug-ins. (see source)

So if your main plug-in file is ...wp-content/plugins/pluginA/pluginA.php your plug-in slug is pluginA/pluginA.php, and will by default check for plug-in updates using that slug.

So to give your plug-in a different slug its necessary to change the name of the plug-in file/directory.

Of course its also possible to just prevent your plug-in from checking for updates or change where it looks (e.g. Have WP Theme update from Git Repository). (This is not allowed for repository-hosted plug-ins).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.