You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A visibility role can now list roles to EXEMPT: a user holding any of the
exclude_roles is not matched even when they satisfy the include roles. This
lets a role-based hide carve out users who hold a broader entitlement — e.g.
hide a tier's pricing on restricted categories EXCEPT for users who are also
dealer/operator — which the prior ANY/ALL positive-only matcher could not
express (no negation).
- Context::user_matches_visibility_role: veto when a user matches any
exclude_role (the synthetic MSRP_CUSTOMER is honored); explicit per-user
targeting is unaffected.
- Config::visibility_roles: normalize/persist exclude_roles.
- Admin\Settings: sanitize and render an "Except roles" multiselect.
- Test: parts_dealer hidden; parts_dealer who is also dealer/operator exempt.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
<p class="description"><?phpesc_html_e( 'Users are matched by these roles. "MSRP Customer" matches anyone without a pricing tier (retail customers, subscribers, guests).', 'wc-pricebook' ); ?></p>
<p class="description"><?phpesc_html_e( 'A user holding any of these roles is exempt from this rule, even if they match the roles above (e.g. hide a tier’s pricing except for users who are also dealer/operator).', 'wc-pricebook' ); ?></p>
0 commit comments