Title: Set Type and Remove Option
Last modified: January 4, 2019

---

# Set Type and Remove Option

 *  Resolved [daileycon](https://wordpress.org/support/users/daileycon/)
 * (@daileycon)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/set-type-and-remove-option/)
 * When the vendor adds a product they have the option to select the “Product Type”.
   How do I remove this option and have all products be Simple and Virtual Downloadable
   checked? My store will only have this type of products so I don’t want to give
   Vendors the option.
 * I would also need “For other product types go to WP Backend” hidden.
 * Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [daileycon](https://wordpress.org/support/users/daileycon/)
 * (@daileycon)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/set-type-and-remove-option/#post-11053154)
 * Would adding the following code work to enable Virtual Downloadable? Then I just
   need a solution to hide the options all together.
 *     ```
       add_filter( 'product_type_options', 'autocheck_vd');
   
       function autocheck_vd( $arr ){
           $arr['virtual']     ['default'] = "yes"; 
           $arr['downloadable']['default'] = "yes"; 
           return $arr;
       }
       ```
   
 *  [DualCube](https://wordpress.org/support/users/dualcube/)
 * (@dualcube)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/set-type-and-remove-option/#post-11054272)
 * Hi [@daileycon](https://wordpress.org/support/users/daileycon/), thanks for reaching
   WCMp Support!!
 * In order to set Simple product only, goto WCMp >> Settings >> Capability and 
   enable only “Simple” product option. (see this screenshot – [https://prnt.sc/m3ab6d](https://prnt.sc/m3ab6d))
 * Now, to remove the mesasge “For other product types go to WP backend “, add this
   css via WCMp >> Settings >> Vendor >> Vendor Frontend >> custom css :
 *     ```
       .add-product-backend {
           display: none;
       }
       ```
   
 * If you want to set “virtual” product enabled by default, then you have to do 
   custom code. For this override the “add-product.php” template file, by copying
   it to yourtheme/dc-product-vendor/vendor-dashboard/product-manager/add-product.
   php
    Now, check how the “downloable” option is enabled by default using `'type'
   => 'checkbox', 'dfvalue' => enable, 'dfvalue' => $is_downloadable`, in this document–
   [https://docs.google.com/document/d/1f99_M7k1KB6X02I5b2R0uq0UX8H_3r8A0eYl-I3BvIU/edit?usp=sharing](https://docs.google.com/document/d/1f99_M7k1KB6X02I5b2R0uq0UX8H_3r8A0eYl-I3BvIU/edit?usp=sharing).
   Apply the same logic for $is_virtual.
 * Let us know if you have any further query.
 *  Thread Starter [daileycon](https://wordpress.org/support/users/daileycon/)
 * (@daileycon)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/set-type-and-remove-option/#post-11069099)
 * I’ve tried every way possible and I just can’t get Virtual and Downloadable to
   be auto checked.
 *  [DualCube](https://wordpress.org/support/users/dualcube/)
 * (@dualcube)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/set-type-and-remove-option/#post-11073318)
 * [@daileycon](https://wordpress.org/support/users/daileycon/), we have released
   an update today with new add product flow, as you can see here – [https://docs.google.com/document/d/1P7fq4Y5JWH7pS1Go5DI-rKOYapZ3verEbvuROFF1cuM/edit?usp=sharing](https://docs.google.com/document/d/1P7fq4Y5JWH7pS1Go5DI-rKOYapZ3verEbvuROFF1cuM/edit?usp=sharing)
 * As this is our major update, we would request you to update the plugin first 
   in staging and then add the same on live.
 * After updating WC Marketplace, delete the overridden template file. Then add 
   this code to the function.php of the current active theme :
 *     ```
       add_filter( 'wcmp_afm_product_type_options', 'autocheck_vd');
   
       function autocheck_vd( $arr ){
           $arr['virtual']     ['default'] = ""yes""; 
           $arr['downloadable']['default'] = ""yes""; 
           return $arr;
       }
       ```
   
 *  Thread Starter [daileycon](https://wordpress.org/support/users/daileycon/)
 * (@daileycon)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/set-type-and-remove-option/#post-11074463)
 * I can’t get that code to work after the update.
 *  [DualCube](https://wordpress.org/support/users/dualcube/)
 * (@dualcube)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/set-type-and-remove-option/#post-11077488)
 * [@daileycon](https://wordpress.org/support/users/daileycon/), we have checked
   this code on our end, working properly.
 * Now, as this is not working for you, can you please get in touch with us over
   our forum, so we can help you out further – [https://wc-marketplace.com/support-forum](https://wc-marketplace.com/support-forum)
 *  [DualCube](https://wordpress.org/support/users/dualcube/)
 * (@dualcube)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/set-type-and-remove-option/#post-11078707)
 * [@daileycon](https://wordpress.org/support/users/daileycon/), Sorry, we checked
   again.
 * Kindly replace that code with this one –
 *     ```
       add_filter (‘wcmp_product_type_options’, ‘autocheck_wcmp_afm_product_type_options’);
       function autocheck_wcmp_afm_product_type_options ($ arr) {
           $arr['virtual']['default'] = "yes"; 
           $arr['downloadable']['default'] = "yes"; 
           return $ arr;
       }
       ```
   

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Set Type and Remove Option’ is closed to new replies.

 * ![](https://ps.w.org/dc-woocommerce-multi-vendor/assets/icon-256x256.gif?rev=
   3314608)
 * [MultiVendorX - WooCommerce Multivendor Marketplace AI Powered Solutions](https://wordpress.org/plugins/dc-woocommerce-multi-vendor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dc-woocommerce-multi-vendor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/)
 * [Active Topics](https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [DualCube](https://wordpress.org/support/users/dualcube/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/set-type-and-remove-option/#post-11078707)
 * Status: resolved