WC_REST_Controller::get_endpoint_args_for_item_schema()
Compatibility functions for WP 5.5, since custom types are not supported anymore. See @link https://core.trac.wordpress.org/changeset/48306
Method of the class: WC_REST_Controller{}
No Hooks.
Return
Array
. Endpoint arguments.
Usage
$WC_REST_Controller = new WC_REST_Controller(); $WC_REST_Controller->get_endpoint_args_for_item_schema( $method );
- $method(string)
- HTTP method of the request.
Default: WP_REST_Server::CREATABLE
WC_REST_Controller::get_endpoint_args_for_item_schema() WC REST Controller::get endpoint args for item schema code WC 8.7.0
public function get_endpoint_args_for_item_schema( $method = WP_REST_Server::CREATABLE ) { $endpoint_args = parent::get_endpoint_args_for_item_schema( $method ); if ( false === strpos( WP_REST_Server::EDITABLE, $method ) ) { return $endpoint_args; } $endpoint_args = $this->adjust_wp_5_5_datatype_compatibility( $endpoint_args ); return $endpoint_args; }