Util
Role Utilities
Tags
Table of Contents
- are_category_rules_overriden() : mixed
- get_categories_roles() : array<string|int, mixed>
- Retrieve the list of the all the product roles assigned in the categories
- get_roles() : array<string|int, mixed>
- Gets all roles on the site and adds a guest role
- is_integer() : bool
- Determines if a value is like an integer
- user_role_scope() : string
- Determine if the user has rules applied
Methods
are_category_rules_overriden()
public
static are_category_rules_overriden(mixed $product_id) : mixed
Parameters
- $product_id : mixed
Tags
Return values
mixed —get_categories_roles()
Retrieve the list of the all the product roles assigned in the categories
public
static get_categories_roles(mixed $product_id) : array<string|int, mixed>
Parameters
- $product_id : mixed
Tags
Return values
array<string|int, mixed> —list of the user roles
get_roles()
Gets all roles on the site and adds a guest role
public
static get_roles() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —is_integer()
Determines if a value is like an integer
public
static is_integer(mixed $input) : bool
Parameters
- $input : mixed
Tags
Return values
bool —user_role_scope()
Determine if the user has rules applied
public
static user_role_scope(mixed $product_id) : string
Parameters
- $product_id : mixed
Tags
Return values
string —the scope of the plugin which has the user role