Filter
rpress_receipt_product_column
On this page
Filters the Items column heading text in the printable receipt.
Applied while the printable receipt is rendered, around the Items 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_product_column', 'my_receipt_label' );
function my_receipt_label( $label ) {
return __( 'Order items', '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 31)
Was this page helpful?
