set order item object as read after reading child class data

This commit is contained in:
Manos Psychogyiopoulos 2016-12-18 20:04:14 +02:00
parent a9a21bf9e0
commit 03fac5231f
6 changed files with 5 additions and 1 deletions

View File

@ -111,7 +111,6 @@ abstract class Abstract_WC_Order_Item_Type_Data_Store extends WC_Data_Store_WP i
'type' => $data->order_item_type,
) );
$item->read_meta_data();
$item->set_object_read( true );
}
/**

View File

@ -31,6 +31,7 @@ class WC_Order_Item_Coupon_Data_Store extends Abstract_WC_Order_Item_Type_Data_S
'discount' => get_metadata( 'order_item', $item->get_id(), 'discount_amount', true ),
'discount_tax' => get_metadata( 'order_item', $item->get_id(), 'discount_amount_tax', true ),
) );
$item->set_object_read( true );
}
/**

View File

@ -32,6 +32,7 @@ class WC_Order_Item_Fee_Data_Store extends Abstract_WC_Order_Item_Type_Data_Stor
'total' => get_metadata( 'order_item', $item->get_id(), '_line_total', true ),
'taxes' => get_metadata( 'order_item', $item->get_id(), '_line_tax_data', true ),
) );
$item->set_object_read( true );
}
/**

View File

@ -35,6 +35,7 @@ class WC_Order_Item_Product_Data_Store extends Abstract_WC_Order_Item_Type_Data_
'total' => get_metadata( 'order_item', $item->get_id(), '_line_total', true ),
'taxes' => get_metadata( 'order_item', $item->get_id(), '_line_tax_data', true ),
) );
$item->set_object_read( true );
}
/**

View File

@ -31,6 +31,7 @@ class WC_Order_Item_Shipping_Data_Store extends Abstract_WC_Order_Item_Type_Data
'total' => get_metadata( 'order_item', $item->get_id(), 'cost', true ),
'taxes' => get_metadata( 'order_item', $item->get_id(), 'taxes', true ),
) );
$item->set_object_read( true );
}
/**

View File

@ -33,6 +33,7 @@ class WC_Order_Item_Tax_Data_Store extends Abstract_WC_Order_Item_Type_Data_Stor
'tax_total' => get_metadata( 'order_item', $item->get_id(), 'tax_amount', true ),
'shipping_tax_total' => get_metadata( 'order_item', $item->get_id(), 'shipping_tax_amount', true ),
) );
$item->set_object_read( true );
}
/**