Filter
rpress_payment_paid_label
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#
| Parameter | Type | Description |
|---|---|---|
$label | string | Label text. |
$state | string | Money state. |
$payment | RPRESS_Payment|null | Payment 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), inrpress_get_payment_paid_label()
See also#
Was this page helpful?
