Created
October 12, 2017 11:28
-
-
Save xadapter/07dfe5c8e931e41f1ee85ddc440a7c3b to your computer and use it in GitHub Desktop.
Add product dimensions in Packing Slip and Delivery Note with Xadapter Print Invoice, Packing Slip, Delivery Note & Label for WooCommerce
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('woocommerce_order_product_title_for_pk_list', 'xa_product_dimension_add_func',99,2); | |
function xa_product_dimension_add_func($item_name ='', $product ='') | |
{ | |
if(!empty($product)) | |
{ | |
return $item_name . ' <small>( '.wc_format_dimensions($product->get_dimensions(false)).' )</small>'; | |
}else | |
{ | |
return $item_name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment