YahnisElsts / plugin-update-checker

A custom update checker for WordPress plugins. Useful if you don't want to host your project in the official WP repository, but would still like it to support automatic updates. Despite the name, it also works with themes.
MIT License
2.22k stars 403 forks source link

activation... #434

Closed Alireza-Ghavabesh closed 3 years ago

Alireza-Ghavabesh commented 3 years ago

Hi thank you for building library...

when I click on update in plugins page it will be update but showing Update failed and a json like this:

{"success":true,"data":{"update":"plugin","slug":"unique-plugin-or-theme-slug","oldVersion":"\u0646\u06af\u0627\u0631\u0634 1.0.0","newVersion":"\u0646\u06af\u0627\u0631\u0634"}

I think most things seem to be true because of "success":true,"data" !

I would also like to say that after Update failed my old version plugin Successfully replaced.

Now what i have to do for fix Update failed to Update Successfully ???

YahnisElsts commented 3 years ago

Some ideas:

geoffthibeau commented 3 years ago

The third parameter of Puc_v4_Factory::buildUpdateChecker should be the theme or plugin slug. Your example response above is using the example slug unique-plugin-or-theme-slug.

If you changed the JSON response in the issue to obfuscate your actual slug, that's fine. But I wanted to call out the possibility of a mismatch if you didn't update the your code to pull your specific slug.

Alireza-Ghavabesh commented 3 years ago

thank you very much, my problem fixed

My problem was that the name of the new plugin was not equal to the third parameter