Setup WooFood for Table Orders only

If you want to setup WooFood to accept orders using only a table number the below hook will help you setup it in no time.

You have to change only the Table Number and the $I based on the maximum number of tables you have

add_filter('woocommerce_checkout_fields', function($fields) {
	 $tables = array();
	for($i = 1; $i <= 60 ; $i++)
	{
			 $tables[$i] = $i;

	}
	$fields['billing']['billing_first_name']['type'] = 'select';
	$fields['billing']['billing_first_name']['options'] = $tables;
	$fields['billing']['billing_first_name']['label'] = 'Table Number';
    unset($fields['billing']['billing_last_name']);
    unset($fields['billing']['billing_company']);
    unset($fields['billing']['billing_address_1']);
    unset($fields['billing']['billing_address_2']);
    unset($fields['billing']['billing_city']);
    unset($fields['billing']['billing_postcode']);
    unset($fields['billing']['billing_country']);
    unset($fields['billing']['billing_state']);
    unset($fields['billing']['billing_phone']);
    unset($fields['shipping']['shipping_first_name']);
    unset($fields['shipping']['shipping_last_name']);
    unset($fields['shipping']['shipping_company']);
    unset($fields['shipping']['shipping_address_1']);
    unset($fields['shipping']['shipping_address_2']);
    unset($fields['shipping']['shipping_city']);
    unset($fields['shipping']['shipping_postcode']);
    unset($fields['shipping']['shipping_country']);
    unset($fields['shipping']['shipping_state']);
    unset($fields['order']['order_comments']);
    unset($fields['billing']['billing_email']);
    unset($fields['account']['account_username']);
    unset($fields['account']['account_password']);
    unset($fields['account']['account_password-2']);

	return $fields;
});