Developers

Console Commands

Wishlist includes console commands you can run from your Craft project’s directory.

Lists

wishlist/lists/purge-inactive-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-lists

Items

wishlist/items/cleanup-orphaned-items

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-items

Resaving

Wishlist adds two actions to Craft’s resave command, which accept Craft’s usual resave options (opens new window), such as --queue and --limit.

resave/wishlist-lists

Re-saves Wishlist lists.

php craft resave/wishlist-lists --queue

resave/wishlist-items

Re-saves Wishlist items.

OptionDescriptionDefault
--list-idOnly re-saves items in the lists with these IDs, separated by commas.All lists
php craft resave/wishlist-items --list-id=12,15