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.26k stars 410 forks source link

Manual update errors not working, wrong property called #418

Closed marcorocca closed 3 years ago

marcorocca commented 3 years ago

Hello, I have discovered that there is an error in the handleManualCheck() function of the Puc_v4p10_Plugin_Ui class: it will check:

if ( ($update === null) && !empty($this->lastRequestApiErrors) ) {

But there is no lastRequestApiErrors property in the class. It must be:

if ( ($update === null) && !empty($this->updateChecker->getLastRequestApiErrors()) ) {

I have tried to correct this behaviour as there are a few points where it uses $this->lastRequestApiErrors and I will send you a pull request if you want.

YahnisElsts commented 3 years ago

Thank you for the report. I guess I didn't do enough testing when I moved that part of the UI code to a separate class.

I'll merge your fix shortly.

marcorocca commented 3 years ago

Thank you, are there any previsions of a release including these fixes?

YahnisElsts commented 3 years ago

Sure, I'll make a release shortly.