Automattic\WooCommerce\Admin\Features\Fulfillments

OrderFulfillmentsRestController::mutable_request_props │ private │ WC 1.0

Pick the fields a write request is allowed to change from the body.

Identity fields (id, entity_id, entity_type) and raw storage props are controller-owned, so they are dropped here and never reach set_props() where they could redirect the write.

Метод класса: OrderFulfillmentsRestController{}

Хуков нет.

Возвращает

array<string, mixed>. The mutable subset of the params.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->mutable_request_props( $params ): array;
$params(array<string, mixed>) (обязательный)
The request body params.

Код OrderFulfillmentsRestController::mutable_request_props() WC 11.3.0

private function mutable_request_props( array $params ): array {
	return array_intersect_key( $params, array_flip( array( 'status', 'is_fulfilled' ) ) );
}