How to set a custom print trigger

You can set a custom hook to fire print jobs whenever that hook is called. This hook must pass the order_id or order object in it’s first argument so that Printus can get the order details to print.

When using the below snippet, Printus will always fire on that hook regardless of what you have selected on the Printus settings page.

The below snippet will send the print job before an order is actually set as complete. This snippet is solely for example purposes. Printus comes with a “Payment complete” trigger that fires when the payment is actually complete and captured by the payment gateway.

function sl_cc_printus_set_print_trigger($hook){
	return 'woocommerce_pre_payment_complete';
add_filter('printus_settings__print_trigger_hook', 'sl_cc_printus_set_print_trigger', 10, 1);
Scroll to Top