WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\StoreApi\Schemas

AbstractSchema::get_extended_schema() protected WC 1.0

Returns extended schema for a specific endpoint.

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

No Hooks.

Return

Array. the data that will get added.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_extended_schema( $endpoint, ...$passed_args );
$endpoint(string) (required)
The endpoint identifer.
...$passed_args(array) (required)
An array of arguments to be passed to callbacks.

Code of AbstractSchema::get_extended_schema() WC 5.8.0

protected function get_extended_schema( $endpoint, ...$passed_args ) {
	$extended_schema = $this->extend->get_endpoint_schema( $endpoint, $passed_args );
	$defaults        = $this->get_recursive_schema_property_defaults( $extended_schema );

	return [
		'type'        => 'object',
		'context'     => [ 'view', 'edit' ],
		'arg_options' => [
			'default'           => $defaults,
			'validate_callback' => $this->get_recursive_validate_callback( $extended_schema ),
			'sanitize_callback' => $this->get_recursive_sanitize_callback( $extended_schema ),
		],
		'properties'  => $extended_schema,
	];
}