Automattic\WooCommerce\Admin\API
ProductsLowInStock::get_collection_params()
Get the query params for collections of attachments.
Метод класса: ProductsLowInStock{}
Хуков нет.
Возвращает
Массив
.
Использование
$ProductsLowInStock = new ProductsLowInStock(); $ProductsLowInStock->get_collection_params();
Код ProductsLowInStock::get_collection_params() ProductsLowInStock::get collection params WC 9.3.1
public function get_collection_params() { $params = array(); $params['context'] = $this->get_context_param(); $params['context']['default'] = 'view'; $params['page'] = array( 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', 'validate_callback' => 'rest_validate_request_arg', 'minimum' => 1, ); $params['per_page'] = array( 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, 'maximum' => 100, 'sanitize_callback' => 'absint', 'validate_callback' => 'rest_validate_request_arg', ); $params['status'] = array( 'default' => 'publish', 'description' => __( 'Limit result set to products assigned a specific status.', 'woocommerce' ), 'type' => 'string', 'enum' => array_merge( array_keys( get_post_statuses() ), array( 'future' ) ), 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ); return $params; }