Viewing 1 replies (of 1 total)
  • Plugin Contributor Md. Ibrahim Khalil

    (@mdibrahimk48)

    Updated code after adding new hook:

    add_filter('wqpmb_show_validation','wqpmb_custom_plus_minus_disable',10, 2);
    add_filter('wqpmb_show_plus_minus','wqpmb_custom_plus_minus_disable',10, 2);
    
    function wqpmb_custom_plus_minus_disable($bool, $data){
    	global $product;
    	if(!is_object($product)) return $bool;
    	
    	if(is_object($product) && $product->get_type() === 'simple'){
    		return $bool;
    	}
    	
    	return false;
    }

    Code from Gist:
    https://gist.github.com/mdibrahimk48/af99012fedeb7fd0611dff61d66d73f3

Viewing 1 replies (of 1 total)
  • The topic ‘how to enable plus minus only for simple product’ is closed to new replies.