Automattic\WooCommerce\Admin\Features\Navigation
Favorites::set_meta_value()
Set given favorites string to the user meta data.
Method of the class: Favorites{}
No Hooks.
Return
null
. Nothing (null).
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.
Favorites::set_meta_value() Favorites::set meta value code WC 9.2.3
private static function set_meta_value( $user_id, $favorites ) { WCAdminUser::update_user_data_field( $user_id, self::META_NAME, wp_json_encode( (array) $favorites ) ); }