New Releases - Nosto/nosto-woocommerce GitHub Wiki
New releases
When doing new releases of the plugin, check the following:
- Version number
- Always change the version number when doing a new release of the plugin
- We use Semantic Versioning (http://semver.org/)
- The version number is located in two files
- In the main plugin file, woocommerce-nosto-tagging.php, the version number can be found in the comment at the top of the file and in the WC_Nosto_Tagging class constant VERSION
- WordPress uses the version string in the top comment to show it on the plugin management screen and for the automatic plugin updates
- The version string in the class constant is used to check version compatibility when the plugin is activated
- In the plugin readme.txt file, the version number can be found in the Stable tag field
- WordPress uses this when doing releases to the WordPress Plugins Directory
- In the main plugin file, woocommerce-nosto-tagging.php, the version number can be found in the comment at the top of the file and in the WC_Nosto_Tagging class constant VERSION
- It is important that all the version numbers are kept identical
- Always change the version number when doing a new release of the plugin
- Plugin updates
- If the changes to the plugin require database changes, structural or content, then those should be invoked from the plugin activation hook, WC_Nosto_Tagging::activate()
- This hook is run when activating the plugin manually, but also when using the automatic plugin update to update the plugin to a newer version
- It is important to check if data exists before adding or modifying it, fortunately WordPress provides many useful utility functions to do this
When the plugin is ready to be released, follow the instructions in Releasing to wordpress.org.
For more information on creating plugins, please refer to the official documentation at: http://codex.wordpress.org/Plugin_Resources