Support » Plugin: Groups » Restrict products access to assigned group

  • Hi,

    Let’s say I have a group called Group A. Some of my products are assigned to Group A from the product editing screen.

    What I want is to have customers assigned to Group A to ONLY have access to products in Group A. That means they cannot see any other products than the ones that were assigned through product editing screen.

    Is there anyway I can do this?

    Please let me know. Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • gtsiokos

    (@gtsiokos)

    Hi,

    This can be accomplished if you restrict all the other products to another group, or restrict all the other product categories to another group( with the premium addon Groups Restrict Categories).

    Kind regards,
    George

    Hi,

    This means that for new products that does not belong to Group A, I will have to add it to another group (let’s say it’s Group B). This is not ideal long term.

    Is there any way to have new products automatically belong to Group B when they are added?

    Thanks!

    Hi,

    Yes you can restrict new products to a group automatically, but you need a custom implementation for this.
    For the new product I would use transition_post_status hook, check if the post is a product and based on the post status you prefer( pending, published etc ), use the method Groups_Post_Access::create($map) to restrict the new product. You can see the usage in Groups plugin API.

    Kind regards,
    George

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.