Allow backorders for certain products in WooCommerce

Using this code snippet you can allow backorders for certain products.