WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Admin\API\Reports\Customers

Controller::prepare_links() protected WC 1.0

Prepare links for the request.

{} It's a method of the class: Controller{}

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->prepare_links( $object );
$object(array) (required)
Object data.

Code of Controller::prepare_links() WC 6.1.0

protected function prepare_links( $object ) {
	if ( empty( $object['user_id'] ) ) {
		return array();
	}

	return array(
		'customer'   => array(
			'href' => rest_url( sprintf( '/%s/customers/%d', $this->namespace, $object['id'] ) ),
		),
		'collection' => array(
			'href' => rest_url( sprintf( '/%s/customers', $this->namespace ) ),
		),
	);
}