WC_REST_Orders_V1_Controller::maybe_set_item_propsprotectedWC 1.0

Maybe set item props if the values were posted.

Method of the class: WC_REST_Orders_V1_Controller{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

WC_REST_Orders_V1_Controller::maybe_set_item_props() code WC 10.3.6

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