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.21k stars 403 forks source link

Activate plugin: Uncaught Error: Class "YahnisElsts\PluginUpdateChecker\v5p3\Plugin\Ui" not found in /var/www/html/wp-content/plugins/seoai-client/plugin-update-checker-5.3/Puc/v5p3/Plugin/UpdateChecker.php:78 #563

Closed Etyamor closed 6 months ago

Etyamor commented 6 months ago

Plugin is conflicting with theme cause theme has class called ui inside. As a result this code prevents to load the needed class for updates functionality (class_exists is not case sensitive):

namespace YahnisElsts\PluginUpdateChecker\v5p3\Plugin;

if ( !class_exists('Ui', false) ):
    /**
     * Additional UI elements for plugins.
     */
    class Ui {
...

Probably, better solution will be use condition in this way:

if ( !class_exists("YahnisElsts\\PluginUpdateChecker\\v5p3\\Plugin\\Ui", false) ):
    /**
     * Additional UI elements for plugins.
     */
    class Ui {
...
YahnisElsts commented 6 months ago

I believe this was already fixed in c1bf33e, I just haven't made a new release since then. Hopefully, I'll get around to that sometime this week.

Etyamor commented 6 months ago

Good to know. Thanks for a quick response. We're waiting for the new release from you :smile: