Trying to write custom handler to extend views_handler_field_term_node_tid Edit: solved, see first reply for answer.

I am trying to write my views filter handler to extend the views_handler_field_term_node_tid class. I believe I have done everything correctly but I'm having no luck. In my module I have implemented hook_views_api()

/**
* Implements hook_views_api().
*/
function mymodule_views_api() {
  return array(
    'api' =&gt; 3,
    'path' =&gt; drupal_get_path('module', mymodule') . '/views',
  );
}


Called the handler.inc file and the mymodule.views.inc in the module .info file:

files[] = views/mymodule.views.inc
files[] = views/mymodule_handler_field_term_node_tid.inc


This is the contents of that file:

class mymodule_handler_field_term_node_tid extends views_handler_field_term_node_tid {

  function option_definition() {
    $options = parent::option_definition();
    $options['convert_spaces'] = array('default' =&gt; FALSE, 'bool' =&gt; TRUE);

    return $options;
  }

  /**
   * Option to replace spaces with hyphens.
   */
  function options_form(&amp;$form, &amp;$form_state) {

    parent::options_form($form, $form_state);

    $form['convert_spaces'] = array(
      '#title' =&gt; t('Convert spaces in term names to hyphens'),
      '#description' =&gt; t('This allows links to work with Views taxonomy term arguments.'),
      '#type' =&gt; 'checkbox',
      '#default_value' =&gt; !empty($this-&gt;options['convert_spaces']),
    );

  }

  function render_item($count, $item) {
    return $item['name'];
  }

}


And finally I have implemented hook_views_data_alter() in the mymodule.views.inc

/**
 * Implements hook_views_data_alter()
 */
function mymodule_views_data_alter(&amp;$data) {
  $data['node']['term_node_tid'] = array(
    'title' =&gt; t('Taxonomy terms on node'),
    'help' =&gt; t('Relate nodes to taxonomy terms, specifying which vocabulary or vocabularies to use. This relationship will cause duplicated records if there are multiple terms.'),
    'relationship' =&gt; array(
      'handler' =&gt; 'views_handler_relationship_node_term_data',
      'label' =&gt; t('term'),
      'base' =&gt; 'taxonomy_term_data',
    ),
      'field' =&gt; array(
      'title' =&gt; t('All taxonomy terms'),
      'help' =&gt; t('Display all taxonomy terms associated with a node from specified vocabularies.'),
      'handler' =&gt; 'mymodule_handler_field_term_node_tid',
      'no group by' =&gt; TRUE,
    ),
  );

}


So the weird issue is that running dpm($data); in my mymodule_views_data_alter function before I alter the $data['node']['term_node_tid'] brings up no reference to that data at all. That is being originally defined in taxonomy.views.inc and should be existing in the $data array because I have added the Content: All taxonomy terms field to my test view. I've been pulling out my hair for the last couple hours trying to figure this out with no luck.
You must adjust your module's weight so that it runs after views. Use hook_module_implements_alter or Modules weight

And then you can also change your code in MYMODULE.views.inc to something simpler:

function MYMODULE_views_data_alter(&amp;$data) {
  $data['node']['term_node_tid']['field']['handler'] = 'MYMODULE_handler_field_term_node_tid';
}