WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

Automattic\WooCommerce\Admin\API\Reports\Customers\Stats

Controller::get_collection_params() public WC 1.0

Get the query params for collections.

{} Это метод класса: Controller{}

Хуков нет.

Возвращает

Массив.

Использование

$Controller = new Controller();
$Controller->get_collection_params();

Код Controller::get_collection_params() WC 4.7.1

<?php
public function get_collection_params() {
	$params                            = array();
	$params['context']                 = $this->get_context_param( array( 'default' => 'view' ) );
	$params['registered_before']       = array(
		'description'       => __( 'Limit response to objects registered before (or at) a given ISO8601 compliant datetime.', 'woocommerce' ),
		'type'              => 'string',
		'format'            => 'date-time',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['registered_after']        = array(
		'description'       => __( 'Limit response to objects registered after (or at) a given ISO8601 compliant datetime.', 'woocommerce' ),
		'type'              => 'string',
		'format'            => 'date-time',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['match']                   = array(
		'description'       => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories', 'woocommerce' ),
		'type'              => 'string',
		'default'           => 'all',
		'enum'              => array(
			'all',
			'any',
		),
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['search']                  = array(
		'description'       => __( 'Limit response to objects with a customer field containing the search term. Searches the field provided by `searchby`.', 'woocommerce' ),
		'type'              => 'string',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['searchby']                = array(
		'description' => 'Limit results with `search` and `searchby` to specific fields containing the search term.',
		'type'        => 'string',
		'default'     => 'name',
		'enum'        => array(
			'name',
			'username',
			'email',
		),
	);
	$params['name_includes']           = array(
		'description'       => __( 'Limit response to objects with specfic names.', 'woocommerce' ),
		'type'              => 'string',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['name_excludes']           = array(
		'description'       => __( 'Limit response to objects excluding specfic names.', 'woocommerce' ),
		'type'              => 'string',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['username_includes']       = array(
		'description'       => __( 'Limit response to objects with specfic usernames.', 'woocommerce' ),
		'type'              => 'string',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['username_excludes']       = array(
		'description'       => __( 'Limit response to objects excluding specfic usernames.', 'woocommerce' ),
		'type'              => 'string',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['email_includes']          = array(
		'description'       => __( 'Limit response to objects including emails.', 'woocommerce' ),
		'type'              => 'string',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['email_excludes']          = array(
		'description'       => __( 'Limit response to objects excluding emails.', 'woocommerce' ),
		'type'              => 'string',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['country_includes']        = array(
		'description'       => __( 'Limit response to objects with specfic countries.', 'woocommerce' ),
		'type'              => 'string',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['country_excludes']        = array(
		'description'       => __( 'Limit response to objects excluding specfic countries.', 'woocommerce' ),
		'type'              => 'string',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['last_active_before']      = array(
		'description'       => __( 'Limit response to objects last active before (or at) a given ISO8601 compliant datetime.', 'woocommerce' ),
		'type'              => 'string',
		'format'            => 'date-time',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['last_active_after']       = array(
		'description'       => __( 'Limit response to objects last active after (or at) a given ISO8601 compliant datetime.', 'woocommerce' ),
		'type'              => 'string',
		'format'            => 'date-time',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['last_active_between']     = array(
		'description'       => __( 'Limit response to objects last active between two given ISO8601 compliant datetime.', 'woocommerce' ),
		'type'              => 'array',
		'validate_callback' => array( '\Automattic\WooCommerce\Admin\API\Reports\TimeInterval', 'rest_validate_between_date_arg' ),
		'items'             => array(
			'type' => 'string',
		),
	);
	$params['registered_before']       = array(
		'description'       => __( 'Limit response to objects registered before (or at) a given ISO8601 compliant datetime.', 'woocommerce' ),
		'type'              => 'string',
		'format'            => 'date-time',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['registered_after']        = array(
		'description'       => __( 'Limit response to objects registered after (or at) a given ISO8601 compliant datetime.', 'woocommerce' ),
		'type'              => 'string',
		'format'            => 'date-time',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['registered_between']      = array(
		'description'       => __( 'Limit response to objects last active between two given ISO8601 compliant datetime.', 'woocommerce' ),
		'type'              => 'array',
		'validate_callback' => array( '\Automattic\WooCommerce\Admin\API\Reports\TimeInterval', 'rest_validate_between_date_arg' ),
		'items'             => array(
			'type' => 'string',
		),
	);
	$params['orders_count_min']        = array(
		'description'       => __( 'Limit response to objects with an order count greater than or equal to given integer.', 'woocommerce' ),
		'type'              => 'integer',
		'sanitize_callback' => 'absint',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['orders_count_max']        = array(
		'description'       => __( 'Limit response to objects with an order count less than or equal to given integer.', 'woocommerce' ),
		'type'              => 'integer',
		'sanitize_callback' => 'absint',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['orders_count_between']    = array(
		'description'       => __( 'Limit response to objects with an order count between two given integers.', 'woocommerce' ),
		'type'              => 'array',
		'validate_callback' => array( '\Automattic\WooCommerce\Admin\API\Reports\TimeInterval', 'rest_validate_between_numeric_arg' ),
		'items'             => array(
			'type' => 'integer',
		),
	);
	$params['total_spend_min']         = array(
		'description'       => __( 'Limit response to objects with a total order spend greater than or equal to given number.', 'woocommerce' ),
		'type'              => 'number',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['total_spend_max']         = array(
		'description'       => __( 'Limit response to objects with a total order spend less than or equal to given number.', 'woocommerce' ),
		'type'              => 'number',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['total_spend_between']     = array(
		'description'       => __( 'Limit response to objects with a total order spend between two given numbers.', 'woocommerce' ),
		'type'              => 'array',
		'validate_callback' => array( '\Automattic\WooCommerce\Admin\API\Reports\TimeInterval', 'rest_validate_between_numeric_arg' ),
		'items'             => array(
			'type' => 'integer',
		),
	);
	$params['avg_order_value_min']     = array(
		'description'       => __( 'Limit response to objects with an average order spend greater than or equal to given number.', 'woocommerce' ),
		'type'              => 'number',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['avg_order_value_max']     = array(
		'description'       => __( 'Limit response to objects with an average order spend less than or equal to given number.', 'woocommerce' ),
		'type'              => 'number',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['avg_order_value_between'] = array(
		'description'       => __( 'Limit response to objects with an average order spend between two given numbers.', 'woocommerce' ),
		'type'              => 'array',
		'validate_callback' => array( '\Automattic\WooCommerce\Admin\API\Reports\TimeInterval', 'rest_validate_between_numeric_arg' ),
		'items'             => array(
			'type' => 'integer',
		),
	);
	$params['last_order_before']       = array(
		'description'       => __( 'Limit response to objects with last order before (or at) a given ISO8601 compliant datetime.', 'woocommerce' ),
		'type'              => 'string',
		'format'            => 'date-time',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['last_order_after']        = array(
		'description'       => __( 'Limit response to objects with last order after (or at) a given ISO8601 compliant datetime.', 'woocommerce' ),
		'type'              => 'string',
		'format'            => 'date-time',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['customers']               = array(
		'description'       => __( 'Limit result to items with specified customer ids.', 'woocommerce' ),
		'type'              => 'array',
		'sanitize_callback' => 'wp_parse_id_list',
		'validate_callback' => 'rest_validate_request_arg',
		'items'             => array(
			'type' => 'integer',
		),
	);
	$params['fields']                  = array(
		'description'       => __( 'Limit stats fields to the specified items.', 'woocommerce' ),
		'type'              => 'array',
		'sanitize_callback' => 'wp_parse_slug_list',
		'validate_callback' => 'rest_validate_request_arg',
		'items'             => array(
			'type' => 'string',
		),
	);

	return $params;
}