Categories

Saturday, April 27, 2024
#919814419350 therichposts@gmail.com
Dokanmultivendor

How to remove the product types from Dokan Multi Vendor?

How to remove the product types from Dokan Multi Vendor?

Hello guys how are you? Welcome back to my blog. Today in this post I will tell you, How to remove the product types from Dokan Multi Vendor?

Working Demo

Guys if you are new in WordPress or in WooCommerce then please check the below links for some good tutorials:

  1. WooCommerce Hooks
  2. WordPress Tricks
  3. WordPress Hooks

1. Guys here the working code snippet and you can add this inside your theme’s header.php, footer.php file:

<script>
  jQuery(document).ready(function($){
          $("#product_type option[value=external], #product_type option[value=variable]").remove();
   });
</script>

I will appreciate that if you will tell your views for this post. Nothing matters if your views will be good or bad because with your views, I will make my next posts more good and helpful.

Jassa

Thanks

therichpost
the authortherichpost
Hello to all. Welcome to therichpost.com. Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know WordPress, Core php, Angularjs, Angular 14, Angular 15, Angular 16, Angular 17, Bootstrap 5, Nodejs, Laravel, Codeigniter, Shopify, Squarespace, jQuery, Google Map Api, Vuejs, Reactjs, Big commerce etc.

3 Comments

  • This worked quite well overall, but in my case I need to remove all product types except for the External/Affiliate. I changed it slightly to the following:

    jQuery(document).ready(function($){
    $(“#product_type option[value=grouped], #product_type option[value=simple], #product_type option[value=variable]”).remove();
    });

    This worked well to remove the other product types, except now the subsequent form to add the URL and button text does not show. Is there any way to make this show? One thing I noticed is that if I change the code to remove all types except External/Affiliate and Simple, it still allows a vendor to choose the External option and that URL and button form appears. The point behind what I’m trying to do is simplify the listing process so no mistakes can be made/wrong product type chosen, as we will only be using Externally linked products.

    Any thoughts on how to accomplish this?

    Thank you

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.