2017-03-09 11:45:22 +00:00
|
|
|
<?php
|
2017-05-10 18:03:19 +00:00
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2018-03-05 18:59:17 +00:00
|
|
|
$hidden_order_itemmeta = apply_filters(
|
2019-12-20 18:25:23 +00:00
|
|
|
'woocommerce_hidden_order_itemmeta',
|
|
|
|
array(
|
2018-03-05 18:59:17 +00:00
|
|
|
'_qty',
|
|
|
|
'_tax_class',
|
|
|
|
'_product_id',
|
|
|
|
'_variation_id',
|
|
|
|
'_line_subtotal',
|
|
|
|
'_line_subtotal_tax',
|
|
|
|
'_line_total',
|
|
|
|
'_line_tax',
|
|
|
|
'method_id',
|
|
|
|
'cost',
|
2018-06-08 11:18:15 +00:00
|
|
|
'_reduced_stock',
|
2018-03-05 18:59:17 +00:00
|
|
|
)
|
|
|
|
);
|
2017-03-09 11:45:22 +00:00
|
|
|
?><div class="view">
|
|
|
|
<?php if ( $meta_data = $item->get_formatted_meta_data( '' ) ) : ?>
|
2016-08-08 14:22:00 +00:00
|
|
|
<table cellspacing="0" class="display_meta">
|
2017-11-21 17:50:30 +00:00
|
|
|
<?php
|
|
|
|
foreach ( $meta_data as $meta_id => $meta ) :
|
|
|
|
if ( in_array( $meta->key, $hidden_order_itemmeta, true ) ) {
|
2016-07-11 14:56:35 +00:00
|
|
|
continue;
|
|
|
|
}
|
2016-08-08 14:22:00 +00:00
|
|
|
?>
|
|
|
|
<tr>
|
2016-08-08 15:20:15 +00:00
|
|
|
<th><?php echo wp_kses_post( $meta->display_key ); ?>:</th>
|
2016-11-23 15:49:35 +00:00
|
|
|
<td><?php echo wp_kses_post( force_balance_tags( $meta->display_value ) ); ?></td>
|
2016-08-08 14:22:00 +00:00
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</table>
|
|
|
|
<?php endif; ?>
|
2016-01-08 11:42:32 +00:00
|
|
|
</div>
|
|
|
|
<div class="edit" style="display: none;">
|
2016-07-11 14:56:35 +00:00
|
|
|
<table class="meta" cellspacing="0">
|
|
|
|
<tbody class="meta_items">
|
2017-03-09 11:45:22 +00:00
|
|
|
<?php if ( $meta_data = $item->get_formatted_meta_data( '' ) ) : ?>
|
2017-11-21 17:50:30 +00:00
|
|
|
<?php
|
|
|
|
foreach ( $meta_data as $meta_id => $meta ) :
|
|
|
|
if ( in_array( $meta->key, $hidden_order_itemmeta, true ) ) {
|
2016-07-11 14:56:35 +00:00
|
|
|
continue;
|
|
|
|
}
|
2016-08-08 14:22:00 +00:00
|
|
|
?>
|
|
|
|
<tr data-meta_id="<?php echo esc_attr( $meta_id ); ?>">
|
2016-07-11 14:56:35 +00:00
|
|
|
<td>
|
2018-02-10 03:33:35 +00:00
|
|
|
<input type="text" maxlength="255" placeholder="<?php esc_attr_e( 'Name (required)', 'woocommerce' ); ?>" name="meta_key[<?php echo esc_attr( $item_id ); ?>][<?php echo esc_attr( $meta_id ); ?>]" value="<?php echo esc_attr( $meta->key ); ?>" />
|
2017-04-26 10:35:34 +00:00
|
|
|
<textarea placeholder="<?php esc_attr_e( 'Value (required)', 'woocommerce' ); ?>" name="meta_value[<?php echo esc_attr( $item_id ); ?>][<?php echo esc_attr( $meta_id ); ?>]"><?php echo esc_textarea( rawurldecode( $meta->value ) ); ?></textarea>
|
2016-07-11 14:56:35 +00:00
|
|
|
</td>
|
|
|
|
<td width="1%"><button class="remove_order_item_meta button">×</button></td>
|
2016-08-08 14:22:00 +00:00
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<?php endif; ?>
|
2016-07-11 14:56:35 +00:00
|
|
|
</tbody>
|
|
|
|
<tfoot>
|
|
|
|
<tr>
|
2017-11-21 17:50:30 +00:00
|
|
|
<td colspan="4"><button class="add_order_item_meta button"><?php esc_html_e( 'Add meta', 'woocommerce' ); ?></button></td>
|
2016-07-11 14:56:35 +00:00
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
|
|
</table>
|
2016-01-08 11:42:32 +00:00
|
|
|
</div>
|