You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require get_template_directory() . '/inc/plugin-update-checker/plugin-update-checker.php'; $myUpdateChecker = Puc_v4_Factory::buildUpdateChecker( 'exampleurl.com/theme.json', __FILE__, //Full path to the main plugin file or functions.php. 'slug' );
works ok to update themes from an external resource.
But i want to know how to, or what is the correct code to get updates from theme AND plugins (both hosted on external urls).
if i add another url below the first json url file with "plugin.json" i get an obvious error.
thanks
The text was updated successfully, but these errors were encountered:
Technically, you can just make a copy of the $myUpdateChecker = Puc_v4_Factory::buildUpdateChecker(...) code, change the variable name and the arguments, and put it below the theme update checker code.
I think the code that updates a plugin usually goes in the plugin and not in the theme, but you can put it in the theme if you want. Just make sure to provide the correct path to the main plugin file - __FILE__ won't work if the code isn't actually in the plugin file.
@AhmadRaza9 It looks like your comment is not related to this issue. If you have a separate problem, please create a new issue.
(And, to save you some time: make sure that your plugin directory is not open in some application - console, IDE, Git/SVN software - while you're trying to install an update.)
Hello,
using the code
require get_template_directory() . '/inc/plugin-update-checker/plugin-update-checker.php'; $myUpdateChecker = Puc_v4_Factory::buildUpdateChecker( 'exampleurl.com/theme.json', __FILE__, //Full path to the main plugin file or functions.php. 'slug' );
works ok to update themes from an external resource.
But i want to know how to, or what is the correct code to get updates from theme AND plugins (both hosted on external urls).
if i add another url below the first json url file with "plugin.json" i get an obvious error.
thanks
The text was updated successfully, but these errors were encountered: