</p></div> <?php } ?> <div class='message_placeholder'></div> <?php if (isset($_GET['action']) && $_GET['action'] == 'details') { ?> <table class="order-table"> <tbody> <?php foreach ($fields as $field) { ?> <?php if ($orders->is_valid_order_field_type($field['field_type'])) { ?> <tr valign="top"> <?php if ($field['field_type'] !== 'separator') { ?> <th scope="row"><label for="<?php echo $field['field_name']; ?> "><?php echo $field['field_title']; ?> </label></th> <?php
function tc_get_order_details_buyer_custom_fields($order_id) { $orders = new TC_Orders(); $fields = $orders->get_order_fields(); $columns = $orders->get_columns(); $order = new TC_Order((int) $order_id); $post_id = (int) $order_id; ?> <p class="form-field form-field-wide"> <h4><?php _e('Buyer Extras', 'tc'); ?> </h4> <table class="order-table"> <tbody> <?php foreach ($fields as $field) { ?> <?php if ($orders->is_valid_order_field_type($field['field_type'])) { ?> <tr valign="top"> <?php if ($field['field_type'] !== 'separator') { ?> <th scope="row"><label for="<?php echo $field['field_name']; ?> "><?php echo $field['field_title']; ?> </label></th> <?php } ?> <td <?php echo $field['field_type'] == 'separator' ? 'colspan="2"' : ''; ?> > <?php do_action('tc_before_orders_field_type_check'); ?> <?php if ($field['field_type'] == 'ID') { echo $order->details->{$field['post_field_type']}; } ?> <?php if ($field['field_type'] == 'function') { eval($field['function'] . '("' . $field['field_name'] . '"' . (isset($post_id) ? ',' . $post_id : '') . (isset($field['id']) ? ',"' . $field['id'] . '"' : '') . ');'); ?> <?php } ?> <?php if ($field['field_type'] == 'text') { ?> <input type="text" class="regular-<?php echo $field['field_type']; ?> " value="<?php if (isset($order)) { if ($field['post_field_type'] == 'post_meta') { echo esc_attr(isset($order->details->{$field['field_name']}) ? $order->details->{$field['field_name']} : ''); } else { echo esc_attr($order->details->{$field['post_field_type']}); } ?> " id="<?php echo $field['field_name']; } ?> " name="<?php echo $field['field_name'] . '_' . $field['post_field_type']; ?> "> <?php } ?> <?php if ($field['field_type'] == 'separator') { ?> <hr /> <?php } ?> <?php do_action('tc_after_orders_field_type_check'); ?> </td> </tr> <?php } } do_action('tc_after_order_details_fields'); ?> </tbody> </table> </p> <?php }