How to create Woocommerce order programatically

Creating a woocommerce order programmatically was bit of a pain until version 2.2 which brings us very easy and efficient way creating order. Here is how you would go about it with woocommerce version 2.2 or later :