• Resolved shenalorlof

    (@shenalorlof)


    I need to show a value before the wish to list button. is there any hook for this purpose? something like before_ti_wishlists_addtowishlist or something?? Actually it’s another plugin shorcode i want to show before wish list button

Viewing 1 replies (of 1 total)
  • Plugin Author templateinvaders

    (@templateinvaders)

    Hi @shenalorlof

    Yes, you can utilize the hook that is used to place add to wishlist button. The add to wishlist button is hooked with priority 10 so you can hook your code with a different priority.

    Below is a sample just for your references:

    
    add_action('tinvwl_wishlist_addtowishlist_button', 'your_custom_function_name', 9, 2);
    
    /**
     *
     *
     * @param WC_Product $product WooCommerce product object.
     * @param bool $loop True when code runs within a product loop.
     */
    function your_custom_function_name($product, $loop)
    {
        // Run your code.
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Single product page Wishlist hook’ is closed to new replies.