Comments (3)
Chances are, the apparent connection between the download_url
and the folder name is a red herring. The WordPress update installer doesn't care what the URL is as long as it points to a valid ZIP file with the right directory structure. Also, I use dynamic download URLs for one of my plugins and have never encountered this problem despite having more than 10,000 active installs and 5+ new releases in the past year.
Here are a few things to check first:
1. The plugin slug
Make sure to pass the correct plugin slug to the update checker constructor. The slug should match the desired plugin folder name, and it should match the slug
value in the JSON data (if any). If you omit the slug, the update checker will try to determine it automatically and occasionally get it wrong.
Example (direct initialization):
$myUpdateChecker = new PluginUpdateChecker(
'http://example.com/metadata-url-here', //Metadata URL
__FILE__, //Main plugin file name
'plugin-slug'
);
Example (factory):
$myUpdateChecker = PucFactory::buildUpdateChecker(
'http://example.com/metadata-url-here', //Metadata URL
__FILE__, //Main plugin file name
'plugin-slug'
);
2. The update ZIP file layout
The root of the ZIP file must contain a single folder whose name matches your plugin slug. All plugin files should go in that folder. For example:
/plugin-slug
/includes
...other files...
plugin-slug.php
readme.txt
Any other folder/directory layout - like putting all plugin files at the root of the ZIP file - will typically result in the update installer leaving the folder name at the default value, which just happens to be index.tmp
.
from plugin-update-checker.
Thank you for your quick reply. The problem was--in fact--that I zipped up the files, not the plugin folder. Once I zipped up the FOLDER all was good in the plugin updating neighborhood.
Your plugin is really quite something special. Thank you for sharing it.
from plugin-update-checker.
Sure, glad to help.
from plugin-update-checker.
Related Issues (20)
- Disable Update Mechanism / Hooks for License Management HOT 8
- 404 Issue when Updating (Fine grained tokens?) HOT 2
- enableReleaseAssets() no longer the supported method HOT 5
- Error PUC 5.1 does not support GitHub in ... HOT 13
- Question about translations HOT 2
- PHP 8.2 Compatibility - Deprecation Notice HOT 3
- "Can't to read the plugin header" errors HOT 2
- Deprecated error HOT 2
- Deprecation notices PHP8 HOT 3
- Some assistance with a universal updater for a private repo HOT 6
- Unable to check version HOT 7
- Using PUC on an external server HOT 2
- Fatal error: Uncaught Error: Class 'YahnisElsts\PluginUpdateChecker\v5p1\DebugBar\Panel' not found HOT 11
- API for self update function HOT 11
- Fatal Error: Unable to determine if plugin or theme HOT 7
- Add query arg to requested .php file HOT 4
- Exclude repo file when updating my plugin HOT 1
- Not seeing "Install Update Now" button in plugin details popup HOT 5
- installed plugin on view details showing "install Now" instead "latest Version installed" HOT 2
- Lite version of the project HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plugin-update-checker.