Admin panel should not hide _ meta.

Fixes #13510
This commit is contained in:
Mike Jolley 2017-03-09 11:45:22 +00:00
parent ee713f82cc
commit a185e57ccb
2 changed files with 21 additions and 32 deletions

View File

@ -1,9 +1,5 @@
<div class="view">
<?php if ( $meta_data = $item->get_formatted_meta_data() ) : ?>
<table cellspacing="0" class="display_meta">
<?php foreach ( $meta_data as $meta_id => $meta ) :
// Skip hidden core fields
if ( in_array( $meta->key, apply_filters( 'woocommerce_hidden_order_itemmeta', array(
<?php
$hidden_order_itemmeta = apply_filters( 'woocommerce_hidden_order_itemmeta', array(
'_qty',
'_tax_class',
'_product_id',
@ -14,7 +10,12 @@
'_line_tax',
'method_id',
'cost',
) ) ) ) {
) );
?><div class="view">
<?php if ( $meta_data = $item->get_formatted_meta_data( '' ) ) : ?>
<table cellspacing="0" class="display_meta">
<?php foreach ( $meta_data as $meta_id => $meta ) :
if ( in_array( $meta->key, $hidden_order_itemmeta ) ) {
continue;
}
?>
@ -29,21 +30,9 @@
<div class="edit" style="display: none;">
<table class="meta" cellspacing="0">
<tbody class="meta_items">
<?php if ( $meta_data = $item->get_formatted_meta_data() ) : ?>
<?php if ( $meta_data = $item->get_formatted_meta_data( '' ) ) : ?>
<?php foreach ( $meta_data as $meta_id => $meta ) :
// Skip hidden core fields
if ( in_array( $meta->key, apply_filters( 'woocommerce_hidden_order_itemmeta', array(
'_qty',
'_tax_class',
'_product_id',
'_variation_id',
'_line_subtotal',
'_line_subtotal_tax',
'_line_total',
'_line_tax',
'method_id',
'cost',
) ) ) ) {
if ( in_array( $meta->key, $hidden_order_itemmeta ) ) {
continue;
}
?>