• Hello,

    I want to use quick view feature for all products except from 2 products that should open in a new link. What’s the code to use in order to disable Quick View option for speecific product IDs ?

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

    (@yithemes)

    Hi,
    try to use this code snippet

    if( ! function_exists( 'yith_exclude_quick_view_button' ) ) {
    	add_filter( 'yith_add_quick_view_button_html', 'yith_exclude_quick_view_button', 10, 3 );
    	function yith_exclude_quick_view_button( $button, $label, $product ) {
    		$product_id = $product->get_id();
    		if( in_array( $product_id, array('1','2') ) ) {
    			return '';
    		}
    		
    		return $button;
    	}
    }

    just change values of 1 and 2 with the id of the products you want to exclude from quick view.
    Regards. ??

Viewing 1 replies (of 1 total)
  • The topic ‘Disable quick view for one specific product’ is closed to new replies.