Console Commands
Wishlist includes console commands you can run from your Craft project’s directory.
Lists
Deletes lists that have been inactive for longer than the purge settings allow, along with their items, and reports how many lists were deleted. Wishlist already does this during Craft’s garbage collection, so run the command when you want to purge lists straight away, such as from a scheduled task. It deletes nothing when purgeInactiveLists is false.
php craft wishlist/lists/purge-inactive-listsItems
Removes item elements whose item record no longer exists, then removes items whose linked element has been deleted. Run it to tidy up items left behind after lists or linked elements were deleted outside Craft’s usual element deletion.
php craft wishlist/items/cleanup-orphaned-itemsResaving
Wishlist adds two actions to Craft’s resave command, which accept Craft’s usual resave options (opens new window), such as --queue and --limit.
Re-saves Wishlist lists.
php craft resave/wishlist-lists --queueRe-saves Wishlist items.
| Option | Description | Default |
|---|---|---|
--list-id | Only re-saves items in the lists with these IDs, separated by commas. | All lists |
php craft resave/wishlist-items --list-id=12,15