Skip to content
Docs
Get RestroPress

Filter

rpress_order_status_colors

Updated
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#

ParameterTypeDescription
$order_status_colorsarrayAssociative 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 1073), in rpress_get_order_status_colors()

See also#

Was this page helpful?