Automattic\WooCommerce\Internal\ShopperLists

ShopperList::remove_itempublicWC 1.0

Remove an item by key. Returns false if the key wasn't present.

Метод класса: ShopperList{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$ShopperList = new ShopperList();
$ShopperList->remove_item( $key ): bool;
$key(строка) (обязательный)
Storage key of the item to remove.

Код ShopperList::remove_item() WC 10.9.1

public function remove_item( string $key ): bool {
	if ( ! isset( $this->items[ $key ] ) ) {
		return false;
	}
	unset( $this->items[ $key ] );
	return true;
}