WordPress at Your Fingertips
function is not described


AbstractSchema::get_item_responses_from_schema() protected WC 1.0

Apply a schema get_item_response callback to an array of items and return the result.

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

No Hooks.


Array. Array of values from the callback function.


// protected - for code of main (parent) or child class
$result = $this->get_item_responses_from_schema( $schema, $items );
$schema(AbstractSchema) (required)
Schema class instance.
$items(array) (required)
Array of items.

Code of AbstractSchema::get_item_responses_from_schema() WC 5.8.0

protected function get_item_responses_from_schema( AbstractSchema $schema, $items ) {
	$items = array_filter( $items );

	if ( empty( $items ) ) {
		return [];

	return array_values( array_map( [ $schema, 'get_item_response' ], $items ) );