thomasgriffin / TGM-Updater

A professional private and commercial plugin update class for WordPress.
97 stars 15 forks source link

What is the remote url exactly? The URL to the .zip? #5

Open torbentschechne opened 9 years ago

torbentschechne commented 9 years ago

I don't know exactly how it should work. I know another library where you just add the plugin slug to a URL, and the script check for the plugin-slug.zip on the other FTP server and shows in WP that an update is available and can be automatically updated.

With the TGM Updater I am asking myself if the remote url should be the plugin-slug.zip URL and this class also checks if the .zip is newer than my installed plugin version?

Do I just need to add my .zip file to another FTP server and add the URL to the TGM Updater?

raphaelnikson commented 8 years ago

no work

solepixel commented 6 years ago

@thomasgriffin

I'm also confused by this. Is there some accompanying code that goes along with this? I've managed to toy with it to realize this library is expecting the remote url to respond with a json_encoded object, something like:

'id' => 'w.org/plugins/plugin-name',
'slug' => 'plugin-folder-slug',
'plugin' => 'plugin-folder-slug/plugin-file.php',
'new_version' => '2.0.0',
'url' => 'https://somewebsiteforplugin.com,
'package' => 'https://gitlab.com/gitlabuser/private-plugin-reponame/repository/master/archive.zip?private_token=YOURAPITOKENHERE',

And I've managed to get the WP Admin to show there's an update here: http://3cd.co/0s3n1F0P1S3l

However the actual plugin won't update. I see "Your plugins are all up to date" http://3cd.co/1o1k3r0r3v1g and on the Plugins page, it doesn't show there's an update.

I also custom wrote the response from the remote URL. It seems like there's a large chunk missing, or do we need to handle this ourselves?