Prevent vendors from selecting “Uncategorized” category in category picker.

WCMp Core

Resolved
Viewing 5 reply threads
  • Author
    Posts
    • #214134
      embpri
      Participant

      Hi,

      I would like to prevent vendors from being able to upload products as “Uncategorized” when using the category step selector during product upload; how can I do this?

      Thanks. 🙂

    • #214135

      @embpri Kindly add the below code in the functions.php file of your current active the –

      
      
      
      add_filter( 'mvx_vendor_product_classify_first_level_categories', 'mvx_vendor_product_cat_remove');
      function mvx_vendor_product_cat_remove($cat_array) {
          $cat_array['exclude'] = array(15); // add category id here separated by comma
          return $cat_array;
      }
      
      
      
      Copy
    • #214139
      embpri
      Participant

      Thank you very much; this removes the category from the list, but it is still visible if searched for. Is there a way to remove it form the search as well?

    • #214151

      @embpri Add the below code in the functions.php file of your current active theme and check –

      
      add_filter('mvx_product_classify_search_category_level_args', 'remove_search');
      function remove_search($args){
      	$args['exclude'] = array(15); // add category id here separated by comma
      	return $args;
      }
      
      Copy
    • #214170
      embpri
      Participant

      Thank you very much for your assistance Sangita ji, please close this thread. 🙂

    • #214181

      You are welcome. We are glad to help you with your queries.
      It would be really great if you can give us 5/5 review here: https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/reviews/#new-post
      This would motivate the team further to do their job more efficiently.

Viewing 5 reply threads

The topic ‘Prevent vendors from selecting “Uncategorized” category in category picker.’ is closed to new replies.