Filter
rpress_receipt_price_column
On this page
Filters the Price column heading text in the printable receipt.
Applied while the printable receipt is rendered, around the Price column heading text (cart table column heading). The returned value is passed through esc_html() and echoed.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$label | null | Return value of the esc_html_e() call that prints the built-in text; always null. See notes. |
Return value#
string. Text to print after the built-in label.
Example#
add_filter( 'rpress_receipt_price_column', 'my_receipt_label' );
function my_receipt_label( $label ) {
return __( 'Amount', 'my-textdomain' );
}
Notes#
The print receipt template echoes the translation itself through esc_html_e(), which prints and returns nothing. The filter therefore receives null, not a string, and its return value is escaped and printed in addition to the original text.
Source#
Applied in:
templates/receipt/print-receipt-content.php(line 32)
Was this page helpful?
