In this post I am going to explain how to add product attribute programmatically in magento 2. We are going to create three custom product attributes. Yes/No, Select Option and Text field. We need to create the data setup script(InstallData.php) with parameters of the new attribute. File path: app/code/Ht/Mymodule/Setup/InstallData.php

  We have created the…