@@ -864,15 +864,22 @@ protected function get_item_list() {
864864 $ items [ $ file ]['requires_php ' ] = isset ( $ plugin_update_info ->requires_php ) ? $ plugin_update_info ->requires_php : null ;
865865 }
866866
867- // If there is a plugin in no_update with a newer version than the local copy, it is because the plugins update api
868- // has already filtered it because the local WordPress version is too low
867+ // If there is a plugin in no_update with a newer version than the local copy, it is either because:
868+ // A: the plugins update API has already filtered it because the local WordPress version is too low
869+ // B: It is possibly a paid plugin that has an update which the user does not qualify for
869870 if ( null !== $ plugin_update_info && version_compare ( $ details ['Version ' ], $ plugin_update_info ->new_version , '< ' ) ) {
870871 $ items [ $ file ]['update ' ] = 'unavailable ' ;
871872 $ items [ $ file ]['update_version ' ] = $ plugin_update_info ->new_version ;
872873 $ items [ $ file ]['requires ' ] = isset ( $ plugin_update_info ->requires ) ? $ plugin_update_info ->requires : null ;
873874 $ items [ $ file ]['requires_php ' ] = isset ( $ plugin_update_info ->requires_php ) ? $ plugin_update_info ->requires_php : null ;
874875
875- $ reason = "This update requires WordPress version $ plugin_update_info ->requires , but the version installed is $ wp_version. " ;
876+ if ( isset ( $ plugin_update_info ->requires ) && version_compare ( $ wp_version , $ requires , '>= ' ) ) {
877+ $ reason = "This update requires WordPress version $ plugin_update_info ->requires , but the version installed is $ wp_version. " ;
878+ } elseif ( ! isset ( $ update_info ['package ' ] ) ) {
879+ $ reason = 'Update file not provided. Contact author for more details ' ;
880+ } else {
881+ $ reason = 'Update not available ' ;
882+ }
876883
877884 $ items [ $ file ]['update_unavailable_reason ' ] = $ reason ;
878885
0 commit comments