WC_REST_Orders_V1_Controller::get_collection_params()
Get the query params for collections.
Метод класса: WC_REST_Orders_V1_Controller{}
Хуков нет.
Возвращает
Массив
.
Использование
$WC_REST_Orders_V1_Controller = new WC_REST_Orders_V1_Controller(); $WC_REST_Orders_V1_Controller->get_collection_params();
Код WC_REST_Orders_V1_Controller::get_collection_params() WC REST Orders V1 Controller::get collection params WC 9.6.0
public function get_collection_params() { $params = parent::get_collection_params(); $params['status'] = array( 'default' => 'any', 'description' => __( 'Limit result set to orders assigned a specific status.', 'woocommerce' ), 'type' => 'string', 'enum' => array_merge( array( 'any' ), $this->get_order_statuses() ), 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ); $params['customer'] = array( 'description' => __( 'Limit result set to orders assigned a specific customer.', 'woocommerce' ), 'type' => 'integer', 'sanitize_callback' => 'absint', 'validate_callback' => 'rest_validate_request_arg', ); $params['product'] = array( 'description' => __( 'Limit result set to orders assigned a specific product.', 'woocommerce' ), 'type' => 'integer', 'sanitize_callback' => 'absint', 'validate_callback' => 'rest_validate_request_arg', ); $params['dp'] = array( 'default' => wc_get_price_decimals(), 'description' => __( 'Number of decimal points to use in each resource.', 'woocommerce' ), 'type' => 'integer', 'sanitize_callback' => 'absint', 'validate_callback' => 'rest_validate_request_arg', ); return $params; }