Pass $item object, not item meta array

Closes #8419
This commit is contained in:
Mike Jolley 2015-06-23 10:24:13 +01:00
parent b43abff674
commit 817e5355fd
2 changed files with 4 additions and 4 deletions

View File

@ -224,7 +224,7 @@ class WC_API_Orders extends WC_API_Resource {
$product_sku = $product->get_sku(); $product_sku = $product->get_sku();
} }
$meta = new WC_Order_Item_Meta( $item['item_meta'], $product ); $meta = new WC_Order_Item_Meta( $item, $product );
$item_meta = array(); $item_meta = array();
@ -1542,7 +1542,7 @@ class WC_API_Orders extends WC_API_Resource {
foreach ( $refund->get_items( 'line_item' ) as $item_id => $item ) { foreach ( $refund->get_items( 'line_item' ) as $item_id => $item ) {
$product = $order->get_product_from_item( $item ); $product = $order->get_product_from_item( $item );
$meta = new WC_Order_Item_Meta( $item['item_meta'], $product ); $meta = new WC_Order_Item_Meta( $item, $product );
$item_meta = array(); $item_meta = array();
foreach ( $meta->get_formatted() as $meta_key => $formatted_meta ) { foreach ( $meta->get_formatted() as $meta_key => $formatted_meta ) {

View File

@ -224,7 +224,7 @@ class WC_API_Orders extends WC_API_Resource {
$product_sku = $product->get_sku(); $product_sku = $product->get_sku();
} }
$meta = new WC_Order_Item_Meta( $item['item_meta'], $product ); $meta = new WC_Order_Item_Meta( $item, $product );
$item_meta = array(); $item_meta = array();
@ -1542,7 +1542,7 @@ class WC_API_Orders extends WC_API_Resource {
foreach ( $refund->get_items( 'line_item' ) as $item_id => $item ) { foreach ( $refund->get_items( 'line_item' ) as $item_id => $item ) {
$product = $order->get_product_from_item( $item ); $product = $order->get_product_from_item( $item );
$meta = new WC_Order_Item_Meta( $item['item_meta'], $product ); $meta = new WC_Order_Item_Meta( $item, $product );
$item_meta = array(); $item_meta = array();
foreach ( $meta->get_formatted() as $meta_key => $formatted_meta ) { foreach ( $meta->get_formatted() as $meta_key => $formatted_meta ) {