WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Features\Navigation

Favorites::set_meta_value() private WC 1.0

Set given favorites string to the user meta data.

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

No Hooks.

Return

null. Nothing.

Usage

$result = Favorites::set_meta_value( $user_id, $favorites );
$user_id(string|number) (required)
User id.
$favorites(array) (required)
Array of favorite values to set.

Code of Favorites::set_meta_value() WC 5.3.0

<?php
private static function set_meta_value( $user_id, $favorites ) {
	Loader::update_user_data_field( $user_id, self::META_NAME, wp_json_encode( (array) $favorites ) );
}