Skip to content

Product Favorites

BuddyVendor lets logged-in members mark WooCommerce products as favorites and browse those favorites from a tab on their profile. This works like a wishlist that lives inside the community.

When Favorite Products is enabled, BuddyVendor prints a heart icon on:

  • Single product pages, after the Add to Cart button.
  • Shop and archive product loops, before each product title.

The icon is only rendered for logged-in users. Clicking it toggles the product between favorited and not favorited without a page reload (an AJAX call). A filled heart means the product is already a favorite; clicking again removes it.

The heart color is configurable. If no color is set, it defaults to #D7443E.

Every member profile gets a Favorite Products tab (label configurable) that lists the products that member has favorited, using the WooCommerce product loop with pagination (10 products per page by default). When the member has no favorites, the tab shows a “No products match your selection” message.

  • The site-wide Enable Favorite Products toggle must be on.
  • The member’s own Enable Favorites Tab preference must be on for the tab to appear on their profile.
  • The visitor must be logged in to see and use the heart icon.

Favorites are stored on both sides so the data can be read from either direction:

  • On the user: a list of favorited product IDs in the buddyvendor_favorite_products user meta key.
  • On the product: a list of the user IDs who favorited it, in the buddyvendor_user_favorite_product post meta key.

See Data Storage for the full list of keys.

  • Label, slug, position, and icon color are set in WB Plugins > BuddyVendor > Favorite Products. See Configure Settings.
  • Developers can filter the label, slug, position, and the number of products shown per page. See Hooks and Filters.