Skip to content
Docs
Get RestroPress

Filter

rpress_payment_statuses

Updated
On this page

Filters the available payment statuses.

Runs at the end of rpress_get_payment_statuses(), which feeds the status filters and labels on the Orders screen and elsewhere. The array maps status slugs (pending, publish, refunded, failed, processing, abandoned) to translated labels. Adding a status here adds a label only; the post status itself must also be registered with register_post_status().

Parameters#

ParameterTypeDescription
$payment_statusesarrayAssociative array of status slug => label.

Return value#

array. The statuses array.

Example#

add_filter( 'rpress_payment_statuses', 'my_add_payment_status', 10, 1 );
function my_add_payment_status( $payment_statuses ) {
	$payment_statuses['on_hold'] = __( 'On hold', 'my-plugin' );
	return $payment_statuses;
}

Source#

Applied in:

  • includes/payments/functions.php (line 878), in rpress_get_payment_statuses()

See also#

Was this page helpful?