Override Theme table function used in contributed module? There is function used in Ubercart module :

function theme_uc_recurring_user_table($variables) {
    ........
}


I want to override result of this function and did by below method in template.php file of my theme:

function MYTHEME_preprocess_table(&amp;$variables) {
  global $user;
  if ($user-&gt;uid) {
    if (current_path() == "user/me/recurring-fees") {
      if(!$variables['header'][7]) {
        $variables['header'][7] = "Donation";
      }
      if(!$variables['rows'][0]['data'][7]) {
        $variables['rows'][0]['data'][7] = l('Update Donation', '/donation');
      }
    }
  }
}




I just added table column header and data below that. But I did this by current path but I think there must be some right approach. 

I am trying to find but not able to figure out how exactly we can achieve this.

Please suggest !! Thanks
theme_uc_recurring_user_table() is a theme hook (not a table function), and its preprocess function is hook_preprocess_uc_recurring_user_table().
From the preprocess function you can just change the content of $variables which, in the case of theme_theme_uc_recurring_user_table() just contains $variables['uid'].

What you need to do is overriding the theme hook implemented from the module, which is quite easy, since you are doing it from a theme.

function MYTHEME_uc_recurring_user_table($variables) {
  $uid = $variables['uid'];
  drupal_add_css(drupal_get_path('module', 'uc_recurring') . '/uc_recurring.css');

  // Set up a header array for the table.
  $header = array(t('Order'), t('Amount'), t('Interval'), t('Next charge'), t('Status'), t('Remaining'), t('Options'));

  if ($GLOBALS['user']-&gt;uid) {
    $header[] = t('Donations');
  }

  $recurring_states = uc_recurring_fee_status_label();

  // Build an array of rows representing the user's fees.
  $rows = array();

  foreach (uc_recurring_get_user_fees($uid) as $fee) {
    // Get the user operations links for the current fee.
    $ops = uc_recurring_get_fee_ops('user', $fee);

    // Add the row to the table for display.
    $rows[] = array(
      'data' =&gt; array(
        l($fee-&gt;order_id, 'user/' . $uid . '/order/' . $fee-&gt;order_id),
        theme('uc_price', $fee-&gt;fee_amount),
        array(
          'data' =&gt; check_plain($fee-&gt;regular_interval),
          'nowrap' =&gt; 'nowrap',
        ),
        format_date($fee-&gt;next_charge, 'short'),
        '&lt;span class="recurring-status-' . intval($fee-&gt;status) . '"&gt;' . $recurring_states[$fee-&gt;status] . '&lt;/span&gt;',
        $fee-&gt;remaining_intervals &lt; 0 ? t('Until cancelled') : $fee-&gt;remaining_intervals,
        array(
          'data' =&gt; implode(' | ', $ops),
          'nowrap' =&gt; 'nowrap',
        ),
      ),
    );
  }

  if (empty($rows)) {
    $rows[] = array(array(
        'data' =&gt; t('Your account has no recurring fees.'),
        'colspan' =&gt; 7,
      ));
  }
  elseif ($GLOBALS['user']-&gt;uid) {
    $rows[0]['data'][] = l('Update Donation', '/donation');
  }

  return theme('table', array('header' =&gt; $header, 'rows' =&gt; $rows));
}