How to avoid plugin name conflicts from the upgrade notifier?

You can remove you plugin from the updateble list with:

add_action( 'plugins_loaded', function(){
    add_filter( 'site_transient_update_plugins', function ( $value ) 
    {
        if( isset( $value->response['google-analytics/google-analytics.php'] ) )
            unset( $value->response['google-analytics/google-analytics.php'] );
        return $value;
    });
});

Adding this filter will eliminate our homonymous plugin altogether from update checks. And it supposes that we are doing the updates manually via simple FPT uploads -or similar. But there are many factors, as discussed in If I rename a plugin (in its main php file) do I still get update notifications?. As per the OP description (same name, different slug), without using a filter, maybe the best is to set the plugin Version header to a greater number or using a less conventional number like yyyy.mm.dd.

If we are setting our own Repo, I believe there won’t be any conflicts.

Leave a Comment