Skip to content
Addonify

Addonify

Documentation & knowledge based site

  • Docs
    • Quick View
    • Compare Products
    • Floating Cart
    • EDD 2Checkout Inline Gateway
  • Plugins
  • Themes
  • Support
  • Blog
Addonify store
  • Docs
    • Quick View
    • Compare Products
    • Floating Cart
    • EDD 2Checkout Inline Gateway
  • Plugins
  • Themes
  • Support
  • Blog

Getting started [2]

  • Installation
  • Access Setting Page

Developer [4]

  • Using Hooks
  • Overwriting Templates
  • Useful Functions
  • Custom Add to Wishlist Button

Support [2]

  • Support & Discussion
  • Dealing with the cache plugins
  • Home
  • Kb
  • WooCommerce Wishlist
  • Developer
  • Custom Add to Wishlist Button

Custom Add to Wishlist Button

  • Updated on: July 29, 2022

Addonify Wishlist also supports custom add to wishlist button. Below is the markup of the custom add to wishlist button:

<button class="adfy-wishlist-btn addonify-add-to-wishlist-btn addonify-custom-wishlist-btn" data-product_id="{product_id}">{button_label}</button>

You can add custom CSS classes, but addonify-add-to-wishlist-btn is a necessary CSS class that is used to fire the add to wishlist functionality.

You also need to provide ID of WooCommerce product in the attribute data-product_id.

You can have your own button label. But if you wish to have the button label from the Addonify Wishlist plugin’s setting page, use the code below:

addonify_wishlist_get_option( 'btn_label' )

Didn't find what you looking for? Try sending your questions from our contact page.

Your feedback matters to us. Was this article helpful to you?

Copyright © 2022 addonify.com. All rights reserved.

Project by 💖 CreamCode.Org