WP_PLUGIN_DIR is not utilized by WordFence
-
Background
WordPress internally uses the constant WP_PLUGIN_DIR to refer to the directory containing installed directories.Affected Sites
All WordPress installations where the plugin directory has been specified as something other than the WordPress default of “WP_CONTENT_DIR/plugins/” and WordFence is installed (verified against WordFence version 5.3.6).Symptoms
When WordPress sends out an alert email regarding an available plugin upgrade, the email does not contain the name of the plugin and instead displays:The Plugin "" needs an upgrade.
.Potential Fix
Edit “/wordfence/lib/wfUtils.php” starting around line 104. Replace:public static function getPluginBaseDir(){ return WP_CONTENT_DIR . '/plugins/'; //return ABSPATH . 'wp-content/plugins/'; }
With:
public static function getPluginBaseDir(){ if(defined('WP_PLUGIN_DIR')) { return wp_normalize_path(WP_PLUGIN_DIR . '/'); } return wp_normalize_path(WP_CONTENT_DIR . '/plugins/'); //return ABSPATH . 'wp-content/plugins/'; }
- The topic ‘WP_PLUGIN_DIR is not utilized by WordFence’ is closed to new replies.