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:
Florian Ludwig 2015-08-31 17:59:41 +02:00
parent 07237d9a09
commit 4e0961333f
2 changed files with 2 additions and 2 deletions

View File

@ -232,7 +232,7 @@ class WC_API_Orders extends WC_API_Resource {
foreach ( $meta->get_formatted( $hideprefix ) as $meta_key => $formatted_meta ) {
$item_meta[] = array(
'key' => $meta_key,
'key' => $formatted_meta['key'],
'label' => $formatted_meta['label'],
'value' => $formatted_meta['value'],
);

View File

@ -232,7 +232,7 @@ class WC_API_Orders extends WC_API_Resource {
foreach ( $meta->get_formatted( $hideprefix ) as $meta_key => $formatted_meta ) {
$item_meta[] = array(
'key' => $meta_key,
'key' => $formatted_meta['key'],
'label' => $formatted_meta['label'],
'value' => $formatted_meta['value'],
);