WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Features\Navigation

Favorites::get_all() public WC 1.0

Get all registered favorites.

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

No Hooks.

Return

WP_Error|Array. Nothing.

Usage

$result = Favorites::get_all( $user_id );
$user_id(string|number)
Identifier of user to query.

Code of Favorites::get_all() WC 5.2.2

<?php
public static function get_all( $user_id = null ) {
	$user = $user_id ?? get_current_user_id();

	if ( ! $user ) {
		return new \WP_Error(
			'woocommerce_favorites_invalid_request',
			__( 'Sorry, invalid request', 'woocommerce' )
		);
	}

	$response = Loader::get_user_data_field( $user, self::META_NAME );

	return $response ? json_decode( $response, true ) : array();
}