mycred_woo_reward_cap
Description
This filter allow you to adjust the capability required for the “myCRED” point reward metabox to be visible when editing a WooCommerce product. By default, your users (and yourself) need to have the edit_others_posts capability to set how many points a product rewards (if at all). This capability on default WordPress installations is held by the “Administrator” and “Editor” roles.
Available since version 1.5
Parameters
| Param | Type | Required | Description |
|---|---|---|---|
$capability |
string | Yes | The WordPress capability required for the metabox to be accessible. This can be a custom capability as well. |
Used By
| Package | Prio. | Description |
|---|---|---|
| Not used by any built-in package. | ||
Examples
Example 1: Change the requirement to a capability that only Administrators have in order to prevent Editors from using it.