Restored wc<2.4 behavior of order item meta keys
The previous version of woocommerce showed the machine readable names in item_meta['key’] especially for the custom variation attributes but after 2.4 it shows only meta ids in the key. This commit reverts the behavior to the prior 2.4 behavior.
This commit is contained in:
parent
07237d9a09
commit
4e0961333f
|
@ -232,7 +232,7 @@ class WC_API_Orders extends WC_API_Resource {
|
||||||
|
|
||||||
foreach ( $meta->get_formatted( $hideprefix ) as $meta_key => $formatted_meta ) {
|
foreach ( $meta->get_formatted( $hideprefix ) as $meta_key => $formatted_meta ) {
|
||||||
$item_meta[] = array(
|
$item_meta[] = array(
|
||||||
'key' => $meta_key,
|
'key' => $formatted_meta['key'],
|
||||||
'label' => $formatted_meta['label'],
|
'label' => $formatted_meta['label'],
|
||||||
'value' => $formatted_meta['value'],
|
'value' => $formatted_meta['value'],
|
||||||
);
|
);
|
||||||
|
|
|
@ -232,7 +232,7 @@ class WC_API_Orders extends WC_API_Resource {
|
||||||
|
|
||||||
foreach ( $meta->get_formatted( $hideprefix ) as $meta_key => $formatted_meta ) {
|
foreach ( $meta->get_formatted( $hideprefix ) as $meta_key => $formatted_meta ) {
|
||||||
$item_meta[] = array(
|
$item_meta[] = array(
|
||||||
'key' => $meta_key,
|
'key' => $formatted_meta['key'],
|
||||||
'label' => $formatted_meta['label'],
|
'label' => $formatted_meta['label'],
|
||||||
'value' => $formatted_meta['value'],
|
'value' => $formatted_meta['value'],
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue