Skip to content
Docs
Get RestroPress

Filter

rpress_print_settings_fields

Updated
On this page

Filters the saved settings array used by the receipt printing code.

Applied to the full rpress_settings option when RPRESS_Print_Receipts reads its settings. Keys of interest include enable_printing, order_print_status, paper_size, order_printing_font, store_logo, footer_area_content and complementary_close. It affects only what the print code sees, not the stored option.

Parameters#

ParameterTypeDescription
$print_settingsarrayThe rpress_settings option array.

Return value#

array. The settings used by the print receipts code.

Example#

function my_print_settings( $print_settings ) {
	$print_settings['paper_size'] = '80.0mm';
	return $print_settings;
}
add_filter( 'rpress_print_settings_fields', 'my_print_settings' );

Notes#

Despite the name, this filters setting values, not field definitions.

Source#

Applied in:

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

See also#

Was this page helpful?