function tc_show_extra_profile_fields_order_history($user)
{
    global $tc;
    ?>

	<h3><?php 
    _e('Ticket Order History', 'tc');
    ?>
<a name="tc_order_history"></a></h3>

	<table class="form-table">

		<tr>
			<th></th>
			<td>
				<?php 
    $user_orders = TC_Orders::get_user_orders($user->ID);
    if (count($user_orders) == 0) {
        _e('No Orders Found', 'tc');
    } else {
        ?>
					<table cellspacing="0" class="widefat shadow-table" cellpadding="10">
						<tr>
							<td><?php 
        _e('Order ID', 'tc');
        ?>
</td>
							<td><?php 
        _e('Status', 'tc');
        ?>
</td>
							<td><?php 
        _e('Date', 'tc');
        ?>
</td>
							<td><?php 
        _e('Total', 'tc');
        ?>
</td>
							<td><?php 
        _e('Details', 'tc');
        ?>
</td>
						</tr>
						<?php 
        $style = '';
        foreach ($user_orders as $user_order) {
            $style = ' class="alternate"' == $style ? '' : ' class="alternate"';
            $order = new TC_Order($user_order->ID);
            ?>
							<tr <?php 
            echo $style;
            ?>
> 
								<td>
									<?php 
            echo $order->details->post_title;
            ?>
								</td>
								<td>
									<?php 
            $post_status = $order->details->post_status;
            $init_post_status = $post_status;
            if ($post_status == 'order_fraud') {
                $color = "red";
            } else {
                if ($post_status == 'order_received') {
                    $color = "#ff6600";
                    //yellow
                } else {
                    if ($post_status == 'order_paid') {
                        $color = "green";
                    }
                }
            }
            if ($post_status == 'order_fraud') {
                $post_status = __('Held for Review', 'tc');
            }
            $post_status = ucwords(str_replace('_', ' ', $post_status));
            echo sprintf(__('%1$s %2$s %3$s', 'tc'), '<font color="' . apply_filters('tc_order_history_color', $color, $init_post_status) . '">', __(ucwords($post_status), 'tc'), '</font>');
            ?>
								</td>
								<td>
									<?php 
            echo tc_format_date($order->details->tc_order_date, true);
            ?>
								</td>
								<td>
									<?php 
            echo apply_filters('tc_cart_currency_and_format', $order->details->tc_payment_info['total']);
            ?>
								</td>
								<td>
									<?php 
            $order_status_url = admin_url('edit.php?post_type=tc_events&page=tc_orders&action=details&ID=' . $order->details->ID);
            ?>
									<a href="<?php 
            echo $order_status_url;
            ?>
"><?php 
            _e('Order Details', 'tc');
            ?>
</a>
								</td>
							</tr>
							<?php 
        }
        ?>
					</table>
					<?php 
    }
    ?>
			</td>
		</tr>

	</table>
	<?php 
}
<?php

if (!is_user_logged_in()) {
    printf(__('Please %s to see your order history.', 'tc'), '<a href="' . wp_login_url() . '">' . __('log in', 'tc') . '</a>');
} else {
    $user_orders = TC_Orders::get_user_orders();
    ?>
	<div class="tc-container">
		<?php 
    if (count($user_orders) == 0) {
        _e('No Orders Found', 'tc');
    } else {
        ?>
			<table cellspacing="0" class="tickera_table" cellpadding="10">
				<tr>
					<th><?php 
        _e('Status', 'tc');
        ?>
</th>
					<th><?php 
        _e('Date', 'tc');
        ?>
</th>
					<th><?php 
        _e('Total', 'tc');
        ?>
</th>
					<th><?php 
        _e('Details', 'tc');
        ?>
</th>