WC_Order_Item_Fee_Data_Store::read()
Read/populate data properties specific to this order item.
Method of the class: WC_Order_Item_Fee_Data_Store{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Order_Item_Fee_Data_Store = new WC_Order_Item_Fee_Data_Store(); $WC_Order_Item_Fee_Data_Store->read( $item );
- $item(WC_Order_Item_Fee) (required) (passed by reference — &)
- Fee order item object.
Changelog
Since 3.0.0 | Introduced. |
WC_Order_Item_Fee_Data_Store::read() WC Order Item Fee Data Store::read code WC 9.4.2
public function read( &$item ) { parent::read( $item ); $id = $item->get_id(); $item->set_props( array( 'amount' => get_metadata( 'order_item', $id, '_fee_amount', true ), 'tax_class' => get_metadata( 'order_item', $id, '_tax_class', true ), 'tax_status' => get_metadata( 'order_item', $id, '_tax_status', true ), 'total' => get_metadata( 'order_item', $id, '_line_total', true ), 'taxes' => get_metadata( 'order_item', $id, '_line_tax_data', true ), ) ); $item->set_object_read( true ); }