Skip to content
Docs
Get RestroPress

Filter

rpress_payment_paid_label

Updated
On this page

Filters the human label for an order's money state.

Runs at the end of rpress_get_payment_paid_label(). Defaults are Paid, Refunded, Payment failed, Abandoned, and for unpaid orders either 'Not paid yet' (cash) or 'Awaiting payment' (online). The state argument is the value after rpress_payment_paid_state was applied.

Parameters#

ParameterTypeDescription
$labelstringLabel text.
$statestringMoney state.
$paymentRPRESS_Payment|nullPayment object, or null.

Return value#

string. Label text.

Example#

function my_paid_label( $label, $state, $payment ) {
	return 'paid' === $state ? __( 'Settled', 'my-plugin' ) : $label;
}
add_filter( 'rpress_payment_paid_label', 'my_paid_label', 10, 3 );

Source#

Applied in:

  • includes/features/payments/payment-state.php (line 100), in rpress_get_payment_paid_label()

See also#

Was this page helpful?