Site logo

Archived topic

Exclude user role from hook

5 replies · Started by Sam on February 25, 2020

Viewing posts 1–6 of 6

Hi, is there a way to exclude user roles from hooks? I see you can exclude locations.

I would like to exclude user role administrator for a hook.

thanks
Sam

Hi Tom, ok noted. Would you mind confirming the below logic is correct? To apply the hook to either logged out users or woocommerce customers, I should include only "logged out users" and "customers". And this would then exclude all other users?

What about if a "customer" was logged in would it still include then because the role is set?

thanks
Sam

The logic uses "or", so if one of the conditions is met, it should display.

Let me know if you need more info :)

OK thanks for your help.

No problem :)

This archived topic is closed to new replies.