Woocommerce – disable selling capabilities on products belonging to a specific seller


I’m going crazy for a few hours, and I need help. Please 🙂
I would like to disable the sale of products added by a specific seller in woocommerce. I use Dokan, a plugin that transforms woocommerce into a market place.
This is what I did and that seems to me a good approach:
I have created a new role “nonsellingshop” which has the same rights as the default seller role created by Dokan.
This role can therefore add products and their price.
I would like products added by this specific role can not be purchased, and instead of the add to cart button appears a message saying ‘This seller does not offer its products for sale online’. Of course for the sellers not having this role, it is necessary that the sale is possible.
It is also necessary that if I change the role of a seller “nonsellingshop” to give it the normal role, the sale becomes possible.

Does anyone have an idea of ​​how I can do this?

Thank you a thousand times in advance for your help

, Thomas 12 months 0 Answers 57 views 0

Leave an answer