The code in this plugin, which you can also use in your child theme, enables you to add a wishlist button to your products using WooCommerce. Once clicked, the product is added to a list which you can display anywhere using a shortcode named [wishlist]
You can output the add to wishlist button using any single product page or shop page hook. When clicked, the product is added to your list using ajax so the page does not require re-loadiing.
Once the products are added to the list and displayed, they can be added to the cart individually or removed from your list.
Features
- Instant product addition to your wishlist from single product pages.
- Instant removal of single products from your wish list.
- Shortcode to display your list pf products.
- Removal button also added to products in your list.
- Add to cart button added to each product in your list.
Installation
1 click installation like any other plugin or copy and paste the PHP code into your child themes functions file and add the CSS to where ever you add custom CSS. there’s also a jQuery file you’ll need to load if using the code in a child theme.
Wishlist Products Shortcode
The [wishlist] shortcode works in any page or post using the shortcode block or classic editor. You can also use the shortcode in a template file like this :
echo do_shortcode('[wishlist]');
You must be logged in to post a comment.