Top WooCommerce & WordPress Plugins › Forums › Maximum Products per User for WooCommerce › How can I set different limits for different users?
- Support forum for the Maximum Products per User for WooCommerce.
- This topic has 2 replies, 2 voices, and was last updated 1 year, 7 months ago by
Moshtafizur.
- AuthorPosts
-
May 10, 2022 at 3:06 pm #100954
Danilo
GuestHI, this is the scenario i have
user1 – user2 – user3
tagA – tagB – tagC
“user1” can buy 10 products but only 3 tagged “tagA” and 3 tagged “tagB”
“user2” can buy 15 products but only 5 tagged “tagA” and 5 tagged “tagB”
“user3” can buy 20 products but only 7 can be tagged “tagA” and 7 tagged “tagB”
Tried with a formula but it doesn t work for me.
Could you help please?
May 10, 2022 at 3:08 pm #100955Danilo
GuestSorry, I forgot to mention that the purchase period is 24 hours.
thnx in advance.
May 11, 2022 at 9:28 am #100956Hello Danilo,
Thanks for reaching out.
We can definitely assist you with this. Please take the following steps:
1. At first, assign all of your product to tagA,
2. Then assign some of your items to tagB as well and others to tagC. Now, assume tagA, tagB, and tagC have respective tag IDs of 38, 39, and 40,
2. Then navigate to WooCommerce > Settings > Maximum Products per User > General and set Date range to This day and Order statuses to appropriate order statuses.
3. Next, navigate to the the Limits section and enable the Per product tag option.
4. Finally go to the Formula section and enable the Limit by formula option. Then, you may use a shortcode such as
[alg_wc_mppu user_id="31" term_id="39,40" limit="3"] [alg_wc_mppu user_id="31" term_id="38" limit="10"] [alg_wc_mppu user_id="32" term_id="39,40" limit="5"] [alg_wc_mppu user_id="32" term_id="38" limit="15"] [alg_wc_mppu user_id="33" term_id="39,40" limit="7"] [alg_wc_mppu user_id="33" term_id="38" limit="20"]
Here, you need to update
user_id
andterm_id
attribute.I hope you found this information beneficial. If you have any other questions or need assistance, please contact me.
- AuthorPosts
- You must be logged in to reply to this topic.