How can I restrict user role to only buying 5 products in the category “toys”?

WPFactory Plugins – Empower Stores Success Forums Maximum Products per User for WooCommerce How can I restrict user role to only buying 5 products in the category “toys”?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #100521
    Pooyan ausi
    Guest

    hi
    please give me a formula

    users role A only can buy 5 products of category “toys” to date 12-12-2021

    thanks

    #100522
    WPFactory Plugins
    Participant
    Plugin Author

    Hi,

    First, you’d have to enable Limits > Per product category.

    Then you have to find out what is the category id. If you hover your mouse on the “toys” category or if you access the “toys” category page you should see a “tag_ID” somewhere on the URL. This is the category id. Let’s suppose it’s 30. The final shortcode would be something like:

    [alg_wc_mppu limit="5" term_id="30" end_date="2021-12-12"]
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.