How to make all submitted products as external automatically

In some cases, if you use our (or any other) frontend form plugin, you may want to make all woocommerce products to be external by default. This is, for example, if you want to create user generated affiliate websites. Problem is that default woocommerce products are always as “Simple” type, not external. This code will make product as external

If you use our RH frontend PRO plugin, find next option in form