Automattic\WooCommerce\StoreApi\Schemas\V1

AbstractSchema::remove_arg_options()protectedWC 1.0

Recursive removal of arg_options.

Method of the class: AbstractSchema{}

No Hooks.

Return

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->remove_arg_options( $properties );
$properties(array) (required)
Schema properties.

AbstractSchema::remove_arg_options() code WC 9.3.3

protected function remove_arg_options( $properties ) {
	return array_map(
		function( $property ) {
			if ( isset( $property['properties'] ) ) {
				$property['properties'] = $this->remove_arg_options( $property['properties'] );
			} elseif ( isset( $property['items']['properties'] ) ) {
				$property['items']['properties'] = $this->remove_arg_options( $property['items']['properties'] );
			}
			unset( $property['arg_options'] );
			return $property;
		},
		(array) $properties
	);
}