Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions includes/class-fs-plugin-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -1079,8 +1079,15 @@ function plugins_api_filter( $data, $action = '', $args = null ) {
$addon_version :
$this->_fs->get_plugin_version();

// Get plugin's newest update.
$new_version = $this->get_latest_download_details( $is_addon ? $addon->id : false, $plugin_version );
// Get plugin's newest update. If it's a view details request, we want the latest available readme information not necessary the latest available version is newer than the current version.
if (
'plugin-information' === fs_request_get( 'tab', false ) &&
$this->_fs->get_slug() === fs_request_get('plugin', false)
) {
$new_version = $this->get_latest_download_details( $is_addon ? $addon->id : false );
}
else
$new_version = $this->get_latest_download_details( $is_addon ? $addon->id : false, $plugin_version );

if ( ! is_object( $new_version ) || empty( $new_version->version ) ) {
$data->version = $plugin_version;
Expand Down