WC_REST_Product_Custom_Fields_Controller::get_collection_params
Add new options for 'order' to the collection params.
Метод класса: WC_REST_Product_Custom_Fields_Controller{}
Хуков нет.
Возвращает
Массив.
Использование
$WC_REST_Product_Custom_Fields_Controller = new WC_REST_Product_Custom_Fields_Controller(); $WC_REST_Product_Custom_Fields_Controller->get_collection_params();
Код WC_REST_Product_Custom_Fields_Controller::get_collection_params() WC REST Product Custom Fields Controller::get collection params WC 10.3.5
public function get_collection_params() {
$params = parent::get_collection_params();
$params['order'] = array(
'description' => __( 'Order sort items ascending or descending.', 'woocommerce' ),
'type' => 'string',
'default' => 'asc',
'enum' => array( 'asc', 'desc' ),
'validate_callback' => 'rest_validate_request_arg',
);
return $params;
}