Automattic\WooCommerce\Admin\Features\Navigation

Favorites::get_all()public staticWC 1.0

Get all registered favorites.

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.

Favorites::get_all() code WC 8.7.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();
}