Filter
rpress_order_status_colors
On this page
Filters the colors used for order statuses.
Runs at the end of rpress_get_order_status_colors(). The array holds a background color under the status slug and a text color under the slug followed by _text (for example 'ready' and 'ready_text'), as hex values. Add both keys for a custom order status.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$order_status_colors | array | Associative array of color keys => hex values. |
Return value#
array. The colors array.
Example#
add_filter( 'rpress_order_status_colors', 'my_order_status_colors', 10, 1 );
function my_order_status_colors( $order_status_colors ) {
$order_status_colors['packed'] = '#cfe8ff';
$order_status_colors['packed_text'] = '#0b3d6b';
return $order_status_colors;
}
Source#
Applied in:
includes/payments/functions.php(line 1077), inrpress_get_order_status_colors()
See also#
Was this page helpful?
