If I rename a plugin (in its main php file) do I still get update notifications?

As SickHippie says and AFAIK, you can’t have both. I’m adding an answer with the info I collected in this Stack.


Disable update notification for individual plugins

Bainternet in a Comment:

Simply open up the plugin file and change the version number to something like 9.9.9

Hameedullah Khan’s Answer (removing Akismet update notice):

function filter_plugin_updates( $value ) {
    unset( $value->response['akismet/akismet.php'] );
    return $value;
}
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );

What Triggers a Plugin Update Alert

Otto’s Answer:

The API uses a rather elaborate mechanism to match plugins against
plugins it knows about, but these are the main things checked for:
Plugin URI, Plugin Name, and Plugin slug (the directory name the
plugin is in)

Change any of those and you reduce the chances of it finding a match,
but it might still get it if two of them match, for example.

Info in the readme.txt is not used for this. The header of the
plugin’s PHP file itself is used.


Alternative approach 1


Alternative approach 2 pulled from the Comments

  • change the plugin name, version number, and directory name
  • install the original plugin but leave it deactivated to receive update notices
  • add a custom message to the plugin description (or replace the original)
  • remove the plugin actions (Activate|Edit|Delete) and the checkbox for Bulk Actions

enter image description here

add_filter( 'all_plugins', 'wpse_56968_on_list_plugins' );
add_filter( 'plugin_action_links_akismet/akismet.php', 'wpse_56968_remove_plugin_actions', 10, 4 );
add_action( 'admin_head-plugins.php', 'wpse_56968_remove_plugin_checkbox' );

function wpse_56968_on_list_plugins( $plugins )
{
    $plugins['akismet/akismet.php']['Description'] = '<strong>*** NOTICE: PLUGIN ONLY TO CHECK UPDATES IN THE ORIGINAL ONE! ***</strong> ';// . $plugins['akismet/akismet.php']['Description'];
    return $plugins;
}

function wpse_56968_remove_plugin_actions( $actions, $plugin_file, $plugin_data, $context ) 
{
    unset( $actions['activate'], $actions['edit'], $actions['delete'] );
    return $actions; 
}

function wpse_56968_remove_plugin_checkbox()
{
    ?>
        <script type="text/javascript">
            jQuery(document).ready( function($) {
                $('tr#akismet th.check-column').html('&nbsp;')
            });     
        </script>
    <?php
}

Related Core Tickets

Leave a Comment