Created
February 13, 2020 05:26
-
-
Save webtoffee-git/8b352f115725a998279b057f2755ec5d to your computer and use it in GitHub Desktop.
Alter packing slip item quantity using WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels plugin
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
add_filter('wf_pklist_alter_package_item_quantiy', 'alter_packing_slip_quantiy', 10 , 5); | |
function alter_packing_slip_quantiy($item_quantity, $template_type, $_product, $item, $order) | |
{ | |
if($template_type=='packinglist') | |
{ | |
if($item_quantity>1) | |
{ | |
$item_quantity = '<span style="color:red;">'.$item_quantity.'</span>'; | |
} | |
} | |
return $item_quantity; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment