I've got a theme that checks for a new version on GitHub. When it finds a new version it downloads it and install it. The problem is that it installs the theme with a different folder name than previous. Resulting errors.
I call the updater with hook
In it I check the GitHub api with:
I set the update
package variable with
0.1.0 is the latest version.
So if I install a theme manually the theme root folder is called something like:
my-theme. Updating the theme downloads a new set of files with a different theme folder name. Something like
my-theme-3d547d1. Next update its again being renamed, something like
How can I prevent this? Is this something on the GitHub side where I rename the target's zip file name or Something wordpress side, where it renames the zip after download and before install?
Wordpress renames the theme folder when fetching theme update from GitHub, how to prevent this