Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Alessio Torrisi

    (@alessio91)

    Hi there,
    please add following code in the file functions.php of your theme to achieve your goal.

    add_action( 'woocommerce_before_shop_loop_item', 'yith_wcqv_customization' );
    
    if( !function_exists( 'yith_wcqv_customization' ) && function_exists( 'YITH_WCQV_Frontend' ) ){
    	function yith_wcqv_customization(){
    		global $product;
    		if( ! $product->is_in_stock() ){
    			remove_action( 'woocommerce_after_shop_loop_item', array( YITH_WCQV_Frontend(), 'yith_add_quick_view_button' ), 15 );
    		}
    
    	}
    }
    Thread Starter tajmohamed30

    (@tajmohamed30)

    hi

    the given snippet is not working

    please refer below link for my quickview settings

    View post on imgur.com

    and below video reference after snippet is added

    thanks

    Plugin Support Alessio Torrisi

    (@alessio91)

    Hi there,
    it’s possible that your theme does not use default WooCommerce hook “woocommerce_before_shop_loop_item“, so my code can’t work.
    Please try plugin and custom code with a WordPress default theme and check again.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disable quickview button for out of stock products’ is closed to new replies.