• Resolved daneswood

    (@daneswood)


    Hello,

    We’ve identified a potential issue with the plugin that appears to be affecting plugin updates on our sites. Our hosting provider helped us investigate a permissions error that occurs when updating plugins via the backend. During testing, they temporarily deactivated the Notifications plugin and were then able to successfully run plugin updates, which indicates the issue is related to this plugin.

    While reviewing the codebase, they found the following filter in the plugin:

    add_filter( ‘filesystem_method’, function() {
    return ‘direct’;
    }, 1000000 );

    Because this filter runs with a very high priority (1000000), it overrides the filesystem method defined in our wp-config.php. Our servers are configured to use the SSH2 filesystem method, but this filter forces WordPress to use the “direct” method instead. As a result, WordPress attempts to update plugins directly rather than via SSH2, which leads to permission errors on the server. Once the plugin was temporarily disabled, plugin updates worked normally again using the configured SSH2 method.

    Would it be possible to adjust this behaviour so it respects the filesystem method defined in wp-config.php or only applies in specific situations?

    Thank you in advance for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.