Skip to content

Instantly share code, notes, and snippets.

@webtoffee-git
Created August 12, 2021 03:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webtoffee-git/263a6ee4a807b66fa3de572bd261d740 to your computer and use it in GitHub Desktop.
Save webtoffee-git/263a6ee4a807b66fa3de572bd261d740 to your computer and use it in GitHub Desktop.
Custom code for displaying customer note in documents-PDF Invoice/Packing slip
<?php
add_filter('wf_pklist_alter_additional_fields','wf_pklist_add_customer_note_invoice',10,3);
function wf_pklist_add_customer_note_invoice($extra_fields,$template_type,$order)
{
if($template_type=='invoice')
{
$cust_note=$order->get_customer_note();
if(!empty($cust_note))
{
$extra_fields['cus_note']=$cust_note;
}
}
return $extra_fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment