Automattic\WooCommerce\Internal\Abilities\Domain
OrdersQuery::get_input_schema
Get the ability input schema.
Method of the class: OrdersQuery{}
No Hooks.
Returns
Array.
Usage
$result = OrdersQuery::get_input_schema(): array;
OrdersQuery::get_input_schema() OrdersQuery::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,
),
'status' => array(
'type' => 'string',
'description' => __( 'Filter by order status slug without the wc- prefix.', 'woocommerce' ),
'enum' => self::get_allowed_order_status_slugs(),
),
'customer_id' => array(
'type' => 'integer',
'description' => __( 'Filter by customer ID. Use 0 to filter guest orders.', 'woocommerce' ),
'minimum' => 0,
),
'billing_email' => array(
'type' => 'string',
'format' => 'email',
),
'parent' => array(
'type' => 'integer',
'description' => __( 'Filter by parent order ID.', 'woocommerce' ),
'minimum' => 1,
),
'exclude' => array(
'type' => 'array',
'description' => __( 'Order IDs to exclude from the results.', 'woocommerce' ),
'items' => array(
'type' => 'integer',
'minimum' => 1,
),
),
'date_after' => array(
'type' => 'string',
'description' => __( 'Filter orders created after this date/time.', 'woocommerce' ),
'format' => 'date-time',
),
'date_before' => array(
'type' => 'string',
'description' => __( 'Filter orders created before this date/time.', 'woocommerce' ),
'format' => 'date-time',
),
'modified_after' => array(
'type' => 'string',
'description' => __( 'Filter orders modified after this date/time.', 'woocommerce' ),
'format' => 'date-time',
),
'modified_before' => array(
'type' => 'string',
'description' => __( 'Filter orders modified before this date/time.', 'woocommerce' ),
'format' => 'date-time',
),
'orderby' => array(
'type' => 'string',
'enum' => array( 'id', 'date', 'date_modified', 'total' ),
),
'order' => array(
'type' => 'string',
'enum' => array( 'asc', 'desc' ),
),
'include_line_items' => array(
'type' => 'boolean',
'description' => __(
'Whether to include order line items in each returned order. Defaults to false.',
'woocommerce'
),
'default' => false,
),
'page' => array(
'type' => 'integer',
'default' => 1,
'minimum' => 1,
),
'per_page' => array(
'type' => 'integer',
'default' => 10,
'minimum' => 1,
'maximum' => 100,
),
),
'additionalProperties' => false,
'default' => array(),
);
}