• I want to limit vendors adding product. For example admin enter 50 limit. Vendor can not add much more 50 product.

    Can I do it with User Role Editor , perhaps with levels. But I can understand levels.

    Thank you so much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    It’s not possible to achieve by changing of user’s roles or capabilities. You need a custom PHP code for this and hook it to the map_meta_cap filter for the ‘create_product’, ‘create_products’ capabilities. Count the quant of created products for the current user and return ‘do_not_allow’ instead of ‘create_products’ in case user has more than 50 own products already.

    Thread Starter yasko

    (@yasko)

    Thank you very much for your reply.

    But I do not know Php. I am not a developer.
    Unfortunately, I can not do it.

    Thank you so much.
    Have a nice day !

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How can limit for vendor role to add product in woocommerce?’ is closed to new replies.