Hook or Filter that exposes order id?
-
Hi,
I would like to create a small snippet for my functions.php file that adds a note to the order when the admin prints the packing list (to be able to tell which are printed and which are yet to be).
Looking through the examples in the plugin help page I wrote this based on the example for
wf_pklist_alter_footer_data
:function add_note_to_order_when_printing_packing_slip( $footer_data, $template_type, $order ) { if( $template_type=='packinglist' ) { $order->add_order_note( 'Packing List Printed', false ); } } add_filter( 'wf_pklist_alter_footer_data', 'add_note_to_order_when_printing_packing_slip', 10, 1 );
However it doesn’t work as the filter
wf_pklist_alter_footer_data
passes only one variable to the function, not the three variables you show in your documntation.Is there any hook or filter that passes both the
$template_type
and the$order
to the function?If I have both of those then I could achieve my goal.
- The topic ‘Hook or Filter that exposes order id?’ is closed to new replies.