Affirm Banner | Q2 2024

added by Latoya

Flash sale: Get up to 30% off themes and extensions. Ends April 26 at 3 pm UTC. Shop the sale.
Product Icon

WooCommerce Print Invoices and Packing Lists

Generate invoices, packing slips, and pick lists for your WooCommerce orders.

I need to have Product variation descriptions displayed in PIP emails/invoices and packing lists

We create packages of products to sell and when the invoice/packing list/pick list is generated we need to have that information included in those documents as they list the items in the package.
I have added the woocommerce suggested code to have the product variation descriptions added to the woocommerce emails and that works as it should they appear in the proper location they just do not appear in the PIP invoices
This is the code that I added to functions.php in the theme
//ADD VARIATION DESCRIPTION TO EMAILS

add_filter( ‘woocommerce_order_item_name’, ‘display_product_title_as_link’, 10, 2 );
function display_product_title_as_link( $item_name, $item ) {

$_product = get_product( $item[‘variation_id’] ? $item[‘variation_id’] : $item[‘product_id’] );

$link = get_permalink( $_product->id );

$_var_description =”;

if ( $item[‘variation_id’] ) {
$_var_description = $_product->get_variation_description();
}

return ”. $item_name .”. $_var_description ;
}

Autore

Current Status

Apri

Last updated: April 4, 2017

0 commenti

Log in to comment on this feature request.