Solution:
You can add attributes from admin side. There is no need to use any hooks for this. In admin side go to products->products
and edit the product for which you want to add attribute. There below the product description you will find attributes tab there you can add your custom product attribute
.
And you can also create common attribute for all the products from Products->Attributes
. Here Add New Attribute and after saving it click on configure terms button to add attribute value