WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Features\Navigation

Favorites::remove_item() public WC 1.0

Remove item from favorites

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

No Hooks.

Return

\WP_Error|Boolean. Throws exception if item does not exist.

Usage

$result = Favorites::remove_item( $item_id, $user_id );
$item_id(string) (required)
Identifier of item to remove.
$user_id(string|number)
Identifier of user to remove from.

Code of Favorites::remove_item() WC 5.3.0

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

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

	$all_favorites = self::get_all( $user );

	if ( ! in_array( $item_id, $all_favorites, true ) ) {
		return new \WP_Error(
			'woocommerce_favorites_does_not_exist',
			__( 'Favorite item not found', 'woocommerce' )
		);
	}

	$remaining = array_values( array_diff( $all_favorites, [ $item_id ] ) );

	self::set_meta_value( $user, $remaining );

	return true;
}