Skip to content
Docs
Get RestroPress

Filter

rpress_receipt_payment_type_text

Updated
On this page

Filters the Payment Type label in the printed receipt.

Applied while the printable receipt is built by the print AJAX handler. The text is wrapped in a bold tag and followed by the gateway admin label. It is only used when the order has a gateway label. The text is inserted into the HTML unescaped.

Parameters#

ParameterTypeDescription
$textstringLabel text, Payment Type: by default.

Return value#

string. The label text.

Example#

function my_receipt_payment_type_text( $text ) {
	return __( 'Paid with: ', 'my-textdomain' );
}
add_filter( 'rpress_receipt_payment_type_text', 'my_receipt_payment_type_text' );

Source#

Applied in:

  • includes/class-rpress-print-receipts.php (line 213), in RPRESS_Print_Receipts::rp_print_payment_data()

See also#

Was this page helpful?