Automattic\WooCommerce\Admin\API

Coupons::get_collection_params()publicWC 1.0

Get the query params for collections.

Метод класса: Coupons{}

Хуков нет.

Возвращает

Массив.

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

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

Код Coupons::get_collection_params() WC 9.4.2

public function get_collection_params() {
	$params           = parent::get_collection_params();
	$params['search'] = array(
		'description'       => __( 'Limit results to coupons with codes matching a given string.', 'woocommerce' ),
		'type'              => 'string',
		'validate_callback' => 'rest_validate_request_arg',
	);
	return $params;
}