WordPress at Your Fingertips
function is not described

WC_Order_Item_Data_Store::update_order_item() public WC 3.0.0

Update an order item.

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

No Hooks.

Return

true|false.

Usage

$WC_Order_Item_Data_Store = new WC_Order_Item_Data_Store();
$WC_Order_Item_Data_Store->update_order_item( $item_id, $item );
$item_id(int) (required)
Item ID.
$item(array) (required)
order_item_name or order_item_type.

Changelog

Since 3.0.0 Introduced.

Code of WC_Order_Item_Data_Store::update_order_item() WC 5.8.0

public function update_order_item( $item_id, $item ) {
	global $wpdb;
	$updated = $wpdb->update( $wpdb->prefix . 'woocommerce_order_items', $item, array( 'order_item_id' => $item_id ) );
	$this->clear_caches( $item_id, null );
	return $updated;
}