Created
August 12, 2021 03:51
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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