Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WC Marketplace › Diable downloadable products and set virtual as default
- This topic has 1 reply, 2 voices, and was last updated 4 years, 10 months ago by
Sushobhan.
- AuthorPosts
- April 21, 2020 at 1:15 am #121153
ZK
ParticipantHi
Is there a way to disable “Downloadable” products and set “Virtual” products as default. I have been able to do this in woocommerce but seems it doesn’t effect the WCMP plugin.
b/w
- April 21, 2020 at 1:08 pm #121268
Sushobhan
KeymasterHello,
Thanks for getting in touch with us.
To disable “Downloadable” products go to Capabilities menu from your WCFM Dashboard. From there uncheck “Downloadable” under Types. Refer to this- https://imgur.com/hn4eenB
Now to set Virtual as default use the following snippt-function wcfm_product_manage_fields_general_custom_virtual( $general_fields, $product_id ) { if( isset( $general_fields['is_virtual'] ) && ! $product_id ) { $general_fields['is_virtual']['dfvalue'] = 'enable'; } return $general_fields; } add_filter( 'wcfm_product_manage_fields_general', 'wcfm_product_manage_fields_general_custom_virtual', 10, 2 );
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/
Let me know how it goes.
Thanks!
- AuthorPosts
- You must be logged in to reply to this topic.