Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi webfresh,

    There is no option to do this from settings panel; however, you can add this snippet of code at the end of function.php file of your theme, to remove the “Add to wishlist” button only for a specific product, selected by ID

    function remove_wishlist_form_products( $post ){
        if( isset( $post ) && isset( $post->ID ) && in_array( $post->ID, array( %PRODUCT_ID_HERE% ) ) ){
            add_filter( 'yith_wcwl_add_to_wishlisth_button_html', '__return_empty_string' );
        }
    }
    
    add_action( 'the_post', 'remove_wishlist_form_products' );

    Don’t forget to replace “%PRODUCT_ID_HERE%” with the actual id of your product

    Let me know if this solves your problem;
    Have a nice day 🙂

    Thread Starter webfresh

    (@webfresh)

    perfect!
    Thanks

    Plugin Author YITHEMES

    (@yithemes)

    Hi webfresh,

    We’re here to help! 🙂
    Marking this as resolved

    Have a nice day

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Exclude 1 product’ is closed to new replies.