WordPress at Your Fingertips
function is not described

WC_Order_Item_Tax_Data_Store::read() public WC 3.0.0

Read/populate data properties specific to this order item.

{} It's a method of the class: WC_Order_Item_Tax_Data_Store{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Order_Item_Tax_Data_Store = new WC_Order_Item_Tax_Data_Store();
$WC_Order_Item_Tax_Data_Store->read( $item );
$item(WC_Order_Item_Tax) (required) (passed by reference — &)
Tax order item object.

Changelog

Since 3.0.0 Introduced.

Code of WC_Order_Item_Tax_Data_Store::read() WC 5.8.0

public function read( &$item ) {
	parent::read( $item );
	$id = $item->get_id();
	$item->set_props(
		array(
			'rate_id'            => get_metadata( 'order_item', $id, 'rate_id', true ),
			'label'              => get_metadata( 'order_item', $id, 'label', true ),
			'compound'           => get_metadata( 'order_item', $id, 'compound', true ),
			'tax_total'          => get_metadata( 'order_item', $id, 'tax_amount', true ),
			'shipping_tax_total' => get_metadata( 'order_item', $id, 'shipping_tax_amount', true ),
			'rate_percent'       => get_metadata( 'order_item', $id, 'rate_percent', true ),
		)
	);
	$item->set_object_read( true );
}