set order item object as read after reading child class data
This commit is contained in:
parent
a9a21bf9e0
commit
03fac5231f
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue