Automattic\WooCommerce\StoreApi\Schemas\V1

AbstractSchema::get_endpoint_args_for_item_schema()publicWC 1.0

Retrieves an array of endpoint arguments from the item schema for the controller.

Method of the class: AbstractSchema{}

No Hooks.

Return

Array. Endpoint arguments.

Usage

$AbstractSchema = new AbstractSchema();
$AbstractSchema->get_endpoint_args_for_item_schema( $method );
$method(string)
HTTP method of the request.
Default: \WP_REST_Server::CREATABLE

AbstractSchema::get_endpoint_args_for_item_schema() code WC 8.7.0

public function get_endpoint_args_for_item_schema( $method = \WP_REST_Server::CREATABLE ) {
	$schema        = $this->get_item_schema();
	$endpoint_args = rest_get_endpoint_args_for_schema( $schema, $method );
	$endpoint_args = $this->remove_arg_options( $endpoint_args );
	return $endpoint_args;
}