WPPizza – A Restaurant Plugin for WordPress › Support › Add-Ons › Extensions › Google Cloudprint › Printing the same order on two printers
- AuthorPosts
- 8 August, 2017 at 8:06 pm #29704
Printing same order on two printers, is it possible? Let’s say I have two printers, one in the kitchen and one behind the bar, both printers connected to laptops/internet. Is it possible to set up to print the same order on both printers?
You mentioned somewhere else:
“as of v3.5.3 you can use the filter wppizza_gcp_filter_copies to set your printerid per copy printed”How to do this please?
Thank you for your time8 August, 2017 at 10:02 pm #29705you need to set the printer id per copy
the filter looks like this$printerid = apply_filters('wppizza_gcp_filter_copies', $printerid, $cp);
where $printerid is – obviously – the printer id and $cp is a simple count depending on how many copies you have set to print8 August, 2017 at 10:08 pm #29707so the filter function should be something along the lines of (if you have it set for 2 copies)
if($cp == 1){ return 'some other printer id'; }else{ return $printerid; }
9 August, 2017 at 12:06 am #29717This reply has been marked as private.9 August, 2017 at 12:11 am #29718no, you are supposed to use a filter.
NEVER EVER edit core files themselves – that’s why filters exist and are left in plugins (among other things).https://www.google.co.uk/search?site=&source=hp&q=wordpress+how+to+use+filters
if you want to do ANY kind of customisation in wordpress you MUST learn about filters and action hooks
9 August, 2017 at 12:14 am #29719you are supposed to USE the filter in your theme’s (or actually your child theme’s) functions.php file , not replace it. that defeats the point of having filters in there in the first place
9 August, 2017 at 12:17 am #29720maybe you should start here first
9 August, 2017 at 1:14 am #29721in short, you need to put something like this in your functions.php
function myprefix_wppizza_gcp_filter_copies( $printerid, $cp ) { if($cp == 1){ return 'some other printer id'; }else{ return $printerid; } } add_filter( 'wppizza_gcp_filter_copies', 'myprefix_wppizza_gcp_filter_copies'. 10, 2 );
- AuthorPosts
- The topic ‘Printing the same order on two printers’ is closed to new replies.