Created
June 3, 2018 12:15
-
-
Save ChromeOrange/914348c0e16cbf9b891b3a1ee2369789 to your computer and use it in GitHub Desktop.
Add product description to item name
This file contains hidden or 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( 'pdf_invoice_item_name', 'add_product_description_pdf_invoice_item_name', 10, 4 ); | |
function add_product_description_pdf_invoice_item_name( $item_name, $item, $product, $order ) { | |
// Use $product->get_id() if you want to get the post id for the product. | |
$item_name .= '<p>' . $product->get_description() . '</p>'; | |
return $item_name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment