If the product is variable then you can set shipping class for the variable product. But when it will simple then there is no shipping class to choose because it will automatically get the global shipping rate which was set by the seller. For a simple product if you want to override shipping cost for a single product then you can override the shipping from the shipping tab.
This doesn't make any sense. To be able to assign a shipping class to a variable product and not to a simple product. This logic that you said only works if i use only dokan shipping and nothing else.
I have assigned one type of shipping to a shipping class. I need to be able to assign a shipping class to a product so this shipping options becomes available to that product.
Please confirm with your developer if we could atribute shipping classes to products on dokan older versions? As far as i can record, it was taken away with dokan 2.0, that introduces the dokan shipping.
If so, the feature already exists. Why don't you implement this logic:
If dokan shipping is activated, show current simple product shipping options. Else, show the ability to assign shipping class.