Automattic\WooCommerce\Admin\Features\Navigation

Favorites::get_all()public staticWC 1.0

Get all registered favorites.

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

No Hooks.

Return

WP_Error|Array.

Usage

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

Code of Favorites::get_all() WC 7.1.0

public static function get_all( $user_id ) {
	$response = WCAdminUser::get_user_data_field( $user_id, self::META_NAME );

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