Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Error when adding new (non-downloadable) product. "File: This field is required.
- This topic has 3 replies, 3 voices, and was last updated 5 years, 1 month ago by
Sushobhan.
- AuthorPosts
- January 9, 2020 at 3:54 am #101416
bolon_campana
ParticipantWhen we try to add a product, we are getting these errors (equivalent to this and this).
File: This field is required
Name: This field is requiredThis error happens since we unsetted the capability to create downloadable products. We tried these two methods:
1) Directly unsetting the capability:
//Disabling virtual and downloadable from the product settings add_filter( 'wcfm_product_manage_fields_general', function($general_fields){ unset( $general_fields['is_virtual'] ); unset( $general_fields['is_downloadable'] ); return $general_fields; } ,501);
2) Changing capability option rules array so wcfmcap_is_allow_fields_general() unsets the field by itself:
//Disabling virtual and downloadable from the product settings add_filter( 'wcfm_capability_options_rules', function($wcfm_capability_options ){ $wcfm_capability_options['downloadable'] = 'yes'; return $wcfm_capability_options; } ,11);
I tend to think this may be in fact a bug on your plugin, but I can’t be sure before asking.
- January 9, 2020 at 7:07 pm #101485
bolon_campana
ParticipantRight now the only solution I could find was hiding those options through CSS, but still that allows that someone tech savvy enough can upload files to the server without our consent with no too much difficulty.
- January 16, 2020 at 8:43 pm #102324
vanilladev89
ParticipantHello
Would putting a low or no data limit fix help?
cheers
- January 20, 2020 at 4:17 pm #102848
Sushobhan
KeymasterHello,
Thank you for contacting and sorry for any inconvenience that might have been caused. If I have understood correctly, you want to remove capability to add virtual or downloadable products. There is a settings to do so without any code customization. From your admin account go to WCFM Frontend dashboad >> Capability, under “Types” disable both Virtual and Downloadable option.
Let me know how this goes.
- AuthorPosts
- You must be logged in to reply to this topic.