Automattic\WooCommerce\StoreApi\Schemas\V1
AbstractSchema::get_endpoint_args_for_item_schema
Retrieves an array of endpoint arguments from the item schema for the controller.
Method of the class: AbstractSchema{}
No Hooks.
Returns
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() AbstractSchema::get endpoint args for item schema code WC 10.3.3
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;
}