WordPress at a glance
function is not described

WC_REST_Orders_V2_Controller::maybe_set_item_props() protected WC 1.0

Maybe set item props if the values were posted.

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

No Hooks.

Return

Null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->maybe_set_item_props( $item, $props, $posted );
$item(WC_Order_Item) (required)
Order item data.
$props(string[]) (required)
Properties.
$posted(array) (required)
Request data.

Code of WC_REST_Orders_V2_Controller::maybe_set_item_props() WC 5.0.0

<?php
protected function maybe_set_item_props( $item, $props, $posted ) {
	foreach ( $props as $prop ) {
		$this->maybe_set_item_prop( $item, $prop, $posted );
	}
}