Filter
rpress_order_alerts_capability
On this page
Filters the capability required for Live Orders and its AJAX actions.
Runs in RPRESS_Order_Alerts::capability(). The returned capability is checked for the Live Orders screen and the order alert AJAX requests. The default is 'edit_shop_payments'. Return a different capability to allow or restrict who can work the board.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$value | string | Default capability. |
Return value#
string. Capability name.
Example#
function my_live_orders_capability( $cap ) {
return 'manage_shop_settings';
}
add_filter( 'rpress_order_alerts_capability', 'my_live_orders_capability' );
Notes#
Pause Orders has its own capability filter, rpress_pause_orders_capability, with the same default.
Source#
Applied in:
includes/features/order-alerts/loader.php(line 393), inRPRESS_Order_Alerts::capability()
See also#
Was this page helpful?
