Automattic\WooCommerce\Internal\Abilities\Domain

OrdersQuery::can_query_orderspublic staticWC 10.9.0

Check order read access.

Method of the class: OrdersQuery{}

No Hooks.

Returns

true|false.

Usage

$result = OrdersQuery::can_query_orders( $input ): bool;
$input(mixed)
Ability input.
Default: array()

Changelog

Since 10.9.0 Introduced.

OrdersQuery::can_query_orders() code WC 11.0.1

public static function can_query_orders( $input = array() ): bool {
	$order_id = self::get_id_from_input( $input );

	return wc_rest_check_post_permissions( 'shop_order', 'read', $order_id );
}