Automattic\WooCommerce\Admin\API\Reports\Categories

Controller::prepare_links │ protected │ WC 1.0

Prepare links for the request.

Method of the class: Controller{}

No Hooks.

Returns

array.

Usage

// protected - for code of main (parent) or child class
$result = $this->prepare_links( $object );
$object(Automattic\WooCommerce\Admin\API\Reports\GenericQuery) (required)
Object data.

Controller::prepare_links() code WC 11.3.0

protected function prepare_links( $object ) {
	$links = array(
		'category' => array(
			'href' => rest_url( sprintf( '/%s/products/categories/%d', $this->namespace, $object['category_id'] ) ),
		),
	);

	return $links;
}