Automattic\WooCommerce\Internal\Abilities\Domain

ProductsQuery::get_input_schemaprivate staticWC 1.0

Get the ability input schema.

Method of the class: ProductsQuery{}

No Hooks.

Returns

Array.

Usage

$result = ProductsQuery::get_input_schema(): array;

ProductsQuery::get_input_schema() code WC 11.0.1

private static function get_input_schema(): array {
	return array(
		'type'                 => 'object',
		'properties'           => array(
			'id'                 => array(
				'type'    => 'integer',
				'minimum' => 1,
			),
			'search'             => array( 'type' => 'string' ),
			'sku'                => array(
				'type'        => 'string',
				'description' => __( 'Limit results to products with SKUs that partially match this string. Use * to match products with any non-empty SKU.', 'woocommerce' ),
			),
			'status'             => array(
				'type' => 'string',
				'enum' => self::get_product_query_status_slugs(),
			),
			'product_type_alias' => array(
				'type'        => 'string',
				'description' => __(
					'Filter by supported agent-facing product type alias. physical maps to simple shippable, non-downloadable products; virtual maps to simple non-shipping, non-downloadable products; digital maps to simple virtual/downloadable products; affiliate maps to the external product type; grouped maps to grouped.',
					'woocommerce'
				),
				'enum'        => self::get_supported_product_type_aliases(),
			),
			'stock_status'       => array(
				'type' => 'string',
				'enum' => array_keys( wc_get_product_stock_status_options() ),
			),
			'page'               => array(
				'type'    => 'integer',
				'default' => 1,
				'minimum' => 1,
			),
			'per_page'           => array(
				'type'    => 'integer',
				'default' => 10,
				'minimum' => 1,
				'maximum' => 100,
			),
		),
		'additionalProperties' => false,
		'default'              => array(),
	);
}