Skip to content
Docs
Get RestroPress

Filter

rpress_payment_status_colors

Updated
On this page

Filters the colors used for payment statuses.

Runs at the end of rpress_get_payment_status_colors(). The array holds a background color under the status slug and a text color under the slug followed by _text (for example 'publish' and 'publish_text'), as hex values. Add both keys when you introduce a custom status.

Parameters#

ParameterTypeDescription
$payment_status_colorsarrayAssociative array of color keys => hex values.

Return value#

array. The colors array.

Example#

add_filter( 'rpress_payment_status_colors', 'my_payment_status_colors', 10, 1 );
function my_payment_status_colors( $payment_status_colors ) {
	$payment_status_colors['on_hold']      = '#f0e1a8';
	$payment_status_colors['on_hold_text'] = '#5c4a00';
	return $payment_status_colors;
}

Source#

Applied in:

  • includes/payments/functions.php (line 895), in rpress_get_payment_status_colors()

See also#

Was this page helpful?