• The plugin has a conflict with variable product. When products have stock control enabled, and a maximum quantity of stock is set, you cannot add the product to the basket.

Viewing 1 replies (of 1 total)
  • It’s not really a fix, but there is a workaround – in ‘woocommerce-max-quantity.php’ (main plugin file) you can comment out (or just delete) lines 156-163.

    It seems that plugin is checking the stock of main product, not it’s variations and returing that the available amount is ‘0’ ??

    
    if ( $variation->managing_stock() && ! $variation->backorders_allowed() ) {
    
    	// Limit our max by the available stock, if stock is lower
    
    	// Set to lessor of stock qty or max allowed
    	$args['max_qty'] = min( $max, $args['max_qty'] );
    
    }
    

    Of course, it may be easy to fix it – just add a new ‘if’ that checks if the product is variable with managed stock.

Viewing 1 replies (of 1 total)
  • The topic ‘Conflict on stock-controlled variable products’ is closed to new replies.