Filter
rpress_receipt_paper_sizes
On this page
Filters the printer paper sizes offered for receipts.
Returned by RPRESS_Print_Receipts::paper_sizes() and used as the options of the paper size setting. Keys are width values in millimetres that end up in the print stylesheet, values are the labels shown in the dropdown. The first entry with an empty key is the placeholder.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$paper_sizes | array | Paper width values mapped to labels. |
Return value#
array. The paper sizes.
Example#
function my_receipt_paper_sizes( $paper_sizes ) {
$paper_sizes['58.0mm'] = '58mm Thermal Printer';
return $paper_sizes;
}
add_filter( 'rpress_receipt_paper_sizes', 'my_receipt_paper_sizes' );
Source#
Applied in:
includes/class-rpress-print-receipts.php(line 51), inRPRESS_Print_Receipts::paper_sizes()
See also#
Was this page helpful?
